ItsyBitsy RP240 i2c doesn't work

For Adafruit customers who seek help with microcontrollers

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
Locked
User avatar
Electronics_DH
 
Posts: 2
Joined: Thu Sep 02, 2021 4:09 am

ItsyBitsy RP240 i2c doesn't work

Post by Electronics_DH »

Good Morning:
I'm having some trouble using the i2c bus from my ItsyBitsy RP2040 https://www.adafruit.com/product/4888 on Arduino.
I will tell my problem in case someone has happened something similar or can provide a solution or idea.
Thanks in advance:

Background:
* I am using the INA3221 module, a voltage and current sensor with i2c connection. https://www.amazon.es/INA3221-monitoriz ... B07HKNLYZ4
* I have correctly installed the libraries in Arduino to use the RP2040-based boards, as indicated in the Adafruit tutorial. https://learn.adafruit.com/rp2040-ardui ... hower-core


I have loaded the Scanner_I2C sample code into ItsyBitsy RP2040 and then connected the INA3221 sensor. Recognizes the I2C address as 0x40. So far everything works as expected.
Then I load an example code from the INA3221 library but it does not work correctly, there is no communication with the sensor. To rule out electrical error or breakage due to static electricity, I have populated several of the ItsyBitsy RP2040 boards that I have (I have tried 3 different boards).

The point is that all the same steps I have tested on the Raspberry PICO board and it works correctly! The Scanner_i2c finds the sensor address 0x40 and later when loading the sample code from INA3221, it communicates and works great.

Why does it work on Raspberry pico board and not ItsyBitsy RP2040 if they both have the same RP2040 microcontroller?

Thanks for the help in advance.

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

Re: ItsyBitsy RP240 i2c doesn't work

Post by adafruit_support_carter »

One thing to be careful of with the QTPY 2040 is the I2C pins on the header and the STEMMA connector are different:
https://learn.adafruit.com/adafruit-qt- ... ep-3091652
They are two separate I2C buses.

But if you were able to see the address in the scan, then it seems like you've configured the pins correctly in that case. Double check that your scan code and INA3221 code are setting things up the same way in terms of the I2C bus.

User avatar
Electronics_DH
 
Posts: 2
Joined: Thu Sep 02, 2021 4:09 am

Re: ItsyBitsy RP240 i2c doesn't work

Post by Electronics_DH »

I have tried the same code from the INA3221 on Raspberry Pico and it has worked wonderfully. The big question is why it doesn't work on ItsyBitsy RP2040 if it has the same microcontroller.
Thanks for your reply :)

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

Re: ItsyBitsy RP240 i2c doesn't work

Post by adafruit_support_carter »

Oops, sorry. You're using an Itsy, not a QtPy.

Are you selecting the Itsy Bitsy RP2040 board in the Arduino IDE?

What library are you using for the INA3221?

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

Return to “Microcontrollers”