0

I have a Circuit Playground Express (CPX) mounted on a Crickit. I want to control two air pumps using the motor output on the Crickit, but also connect two Adafruit SCD41 sensors using I2C.

When I connect the SCD41 to the CPX without the Crickit, it works. When I do the same with the CPX mounted on the Crickit, it does not work.

I assume this has something to do with the Crickit "occupying" the I2C-bus.

I also have a TCA9548A I2C multiplexer, but I'm not sure if this will help me, or how to use it. Should I connect the multiplexer to the CPX, and have the Crickit and the two sensors connected as multiplexed devices?

How to proceed?

jsotola
1,5342 gold badges12 silver badges20 bronze badges
asked May 16 at 13:13
4
  • I assume this has something to do with the Crickit "occupying" the I2C-bus. ... do not assume anything, make certain Commented May 16 at 16:15
  • @jsotola: Fair enough, but I don't know how to make certain, so I'll ask: Will the Crickit block other devices from using I2C? I tried using the TCA9548A I2C multiplexer, but I'm getting an error "OSError: [Errno 5] Input/output error". So I'm not sure what to try next. Commented May 23 at 13:21
  • run an I2C scanner program to determine which addresses are being used ... that will tell you if there is a conflict between devices Commented May 23 at 13:47
  • Thank you. First I tried with only Crickit connected. It returned address 0x49, which makes sense. This is the Crickit board. Next I connected the I2C multiplexer to the same SDA and SCL that the Crickit board uses, and now read '0x49', '0x70'. 70 is the multiplexer so this is good. However, now my issues begin. In order to access the devices connected to the multiplexer I do this: tca = adafruit_tca9548a.TCA9548A(i2c) followed by tca[0].try_lock(), but this causes the error OSError: [Errno 5] Input/output error Commented May 26 at 7:26

0

Know someone who can answer? Share a link to this question via email, Twitter, or Facebook.

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.