Connecting a Seesaw soil probe through a TCA9548a

CircuitPython on hardware including Adafruit's boards, and CircuitPython libraries using Blinka on host computers.

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
Locked
User avatar
CapeZinFan
 
Posts: 7
Joined: Sun Jan 03, 2021 12:10 am

Connecting a Seesaw soil probe through a TCA9548a

Post by CapeZinFan »

I am trying to connect one of the green Seesaw soil moisture/temprature probes to a Fun House board. This project has several sensors and all of them connect just fine except the Seesaw. Here is the code I'm using to try to set up the connection:

#Create the Sparkfun MUX (TCA9548A) object and give it the I2C bus
tca = adafruit_tca9548a.TCA9548A(i2c)

# for each sensor, create it using the TCA9548a channel instead of the I2C object
ambient = adafruit_mcp9808.MCP9808(tca[0]) # ambient.temperature
bottom = adafruit_mcp9808.MCP9808(tca[4]) # bottom.temperature
mid = adafruit_mcp9808.MCP9808(tca[5]) # mid.temperature
co2 = adafruit_scd4x.SCD4X(tca[1]) # co2.CO2; co2.temperature; co2.relative_humidity
light = adafruit_bh1750.BH1750(tca[7]) # light.lux
h2o = Seesaw(tca[6]) # h2o.moisture_read; h2o.get_temp

When I run this code, it crashes because "there is no I2C device at address: 0x49"
What am I doing wrong?

User avatar
CapeZinFan
 
Posts: 7
Joined: Sun Jan 03, 2021 12:10 am

Re: Connecting a Seesaw soil probe through a TCA9548a

Post by CapeZinFan »

I should also have said, this code runs fine if I comment out the line which attempts to create the Seesaw link.

User avatar
mrrmay
 
Posts: 42
Joined: Sun Mar 28, 2021 11:51 am

Re: Connecting a Seesaw soil probe through a TCA9548a

Post by mrrmay »

Hmm… seems like seen this before with another device.

Have you,
- checked the other I2C addresses?
- checked the wire connection?

I also fried a BME280 and got this response.

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

Re: Connecting a Seesaw soil probe through a TCA9548a

Post by adafruit_support_carter »

The soil sensor has an I2C address of 0x36, which must be specified when setting up the soil sensor. See example code in guide:
https://learn.adafruit.com/adafruit-ste ... ge-3009830


For your code, change this line:

Code: Select all

 h2o = Seesaw(tca[6]) # h2o.moisture_read; h2o.get_temp
to:

Code: Select all

 h2o = Seesaw(tca[6], addr=0x36) # h2o.moisture_read; h2o.get_temp

User avatar
CapeZinFan
 
Posts: 7
Joined: Sun Jan 03, 2021 12:10 am

Re: Connecting a Seesaw soil probe through a TCA9548a

Post by CapeZinFan »

Thank you! That did solve my problem. Now, to be sure I understand why the Seesaw module operates different from all(?)/most(?) Adafruit modules is that the Adafruit modules imbed the i2c address in their definition (which they can do because each module is board specific, or nearly so) and the Seesaw module actually covers several different sensors and boards, so can't do that. Is that sort of correct?

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

Re: Connecting a Seesaw soil probe through a TCA9548a

Post by adafruit_support_carter »

That's generally correct. However, even the other non-seesaw boards may have different I2C addresses. As much as possible, libraries are written to work with the default address the board ships with. That way, no additional parameters are needed to use the board "out of the box". But if an alternate address is set, then it would need to be specified in a similar manner in the code.

The PCA9685 is a good example of this:
https://learn.adafruit.com/16-channel-p ... rds-848847
It has over 60 settable addresses!

The info here may also help:
https://learn.adafruit.com/working-with ... 2c-devices

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

Return to “Adafruit CircuitPython”