I’m trying to use a qwiic soil moisture sensor https://www.sparkfun.com/products/17731 but it does not show up in a micropython I2C scan. I tried it on a xbee https://www.sparkfun.com/products/21636 using a https://www.sparkfun.com/products/22329 dev board. I also tried it on a raspberry pi pico as well. Here is the code for the scans that ran on each microcontroller.
#xbee3 code
from machine import I2C
print(" +-------------------------------------+")
print(" | XBee MicroPython I2C Scanner Sample |")
print(" +-------------------------------------+\n")
# Instantiate an I2C peripheral.
i2c = I2C(1)
# Scan for I2C slaves connected to the interface and print their address.
for address in i2c.scan():
print("- I2C device found at address: %s" % hex(address))
#pi pico code
from machine import I2C, Pin
i2c = I2C(0, sda=Pin(0), scl=Pin(1), freq=400000)
for address in i2c.scan():
print("- I2C device found at address: %s" % hex(address))
In both cases, no I2C device was discovered. I tried playing around with the frequency a bit but nothing worked. I also have a qwiic green led button https://www.sparkfun.com/products/16842 that I tested on both microcontrollers and it worked great. I got the “- I2C device found at address: 0x6f” response from my python script on both the xbee and the pico when the green led button was connected. Is there a chance that the qwiic soil moisture sensor I have is faulty, or is there something I am missing. I also forgot to mention that when I connect the soil sensor to a microcontroller the power led does light up, so I don’t think there is power issues.