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.
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)
Either way, I'm a bit stuck. The pinouts all seem to match up
I really appreciate any advice. I'm feel like I've probably missed something basic.
Thank and have a great day!