MAGTAG and Stemma soil sensor

General project help for Adafruit customers

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
Locked
User avatar
conyerbd
 
Posts: 4
Joined: Mon Mar 20, 2023 7:20 pm

MAGTAG and Stemma soil sensor

Post by conyerbd »

Hey all,

This is the first project I've worked on and I'm a bit stuck getting my Magtag to recognize the stemma soil sensor.

Here's a pic of it plugged in. Ignore the running code on the display.

Image

Using the sample code below I get an error that there's no device at the address 0x36. I've tried both the board.I2C and board.STEMMA_I2C without success.

Code: Select all

import time

import board

from adafruit_seesaw.seesaw import Seesaw

i2c_bus = board.I2C()  # uses board.SCL and board.SDA
# i2c_bus = board.STEMMA_I2C()  # For using the built-in STEMMA QT connector on a microcontroller

ss = Seesaw(i2c_bus, addr=0x36)

while True:
    # read moisture level through capacitive touch pad
    touch = ss.moisture_read()

    # read temperature from the temperature sensor
    temp = ss.get_temp()

    print("temp: " + str(temp) + "  moisture: " + str(touch))
    time.sleep(1)
I thought maybe it could be at a different address and running an i2c scan all I get is 0x19 (which shows up even when nothing in plugged in) wondering if this is the battery or some onboard device.

Either way, I'm a bit stuck. The pinouts all seem to match up

Image
Image

I really appreciate any advice. I'm feel like I've probably missed something basic.

Thank and have a great day!

User avatar
conyerbd
 
Posts: 4
Joined: Mon Mar 20, 2023 7:20 pm

Re: MAGTAG and Stemma soil sensor

Post by conyerbd »

Small update that I tested another stemma I2C device which was immediately picked up by the MagTag. So the issue is either with the soil sensor, the cable or a small chance some strange incompatibility with the soil sensor and MagTag.

User avatar
adafruit_support_carter
 
Posts: 29159
Joined: Tue Nov 29, 2016 2:45 pm

Re: MAGTAG and Stemma soil sensor

Post by adafruit_support_carter »

As another check, try running an I2C scan on the MagTag with the Soil Sensor attached:
https://learn.adafruit.com/scanning-i2c ... s/overview

See if at least the address will show up in the scan?

User avatar
conyerbd
 
Posts: 4
Joined: Mon Mar 20, 2023 7:20 pm

Re: MAGTAG and Stemma soil sensor

Post by conyerbd »

Thanks for the response,

I've tried an I2C scan with everything plugged in and it only finds 0x19 which is the built in accelerometer.

I wish I had another soil sensor to see if there's something wrong with this one.

User avatar
adafruit_support_carter
 
Posts: 29159
Joined: Tue Nov 29, 2016 2:45 pm

Re: MAGTAG and Stemma soil sensor

Post by adafruit_support_carter »

Let's just replace the Soil Sensor.

Send an email to [email protected] with a link to this thread and your order number and they can send you a replacement STEMMA Soil Sensor.

User avatar
conyerbd
 
Posts: 4
Joined: Mon Mar 20, 2023 7:20 pm

Re: MAGTAG and Stemma soil sensor

Post by conyerbd »

Wow! I'm lucky enough to have a Microcenter down the street where I could quickly pick up a spare. Lo and behold it works!

Guess I just got really unlucky with my first order. I'll still follow up with the replacement as I'd like to have several eventually.

Thanks again for all the help!

User avatar
adafruit_support_carter
 
Posts: 29159
Joined: Tue Nov 29, 2016 2:45 pm

Re: MAGTAG and Stemma soil sensor

Post by adafruit_support_carter »

Cool. Glad the other one worked. Yep - please go ahead and email for a replacement.

If you still happen to have the plastic bag the non-working Soil Sensor came in, please post a photo of it showing the white sticker with barcode and logo.

Locked
Please be positive and constructive with your questions and comments.

Return to “General Project help”