Hi, im trying to connect the nano to a mpr121 breakout board by adafruit. Im using circuit python rather that Arduino ide. Ive posted the code and the serial data below. Im able to query the SDA and SCL pins from the board library and it returns A4 and A5. However I cannot seem to make an I2C instance without an error. Ive checked wiring but all seems fine. Im aware adafruit boards already apply a pull up resistor as well.
You're using an Arduino Nano ESP32, correct?
Have you tried using MicroPython rather than CircuitPython?
BusIO is a wrapper to several protocols, including I2C, so I'm not sure how it configures things behind the scene, but can you try and replace board.SCL and board.SDA with 12 and 11?
I'm not a fan of CP, but I love MicroPython.
In theory you could just replace all of the BusIO stuff with native MicroPython,
but I don't know how much Adafruit hides/modifies from the original code.
You are pushing your luck.
There are many odd things together. You have a ESP32-S3 instead of a ESP32, you use an Arduino board and then try to run Adafruit code on it, you use CircuitPython, the MPR121 is one of those weird chips that do not acknowledge to any I2C write if I remember it well, and then there are issues.
I swapped out the mpr sheild for a a different mpr shield with qwik connection and that works fine.
Adafruit support the nano esp32 with a cp build. Thats why I was curious to try, from my few days of experimenting I'm finding the repl great, easier to try things, a lot less code but ofc a lot slower to boot up.
Ive rarely used python for anything other that computer vision but I'm curious now and will persevere with cp and mp
I just tested a Grove MPR121 attached via Grove to my Nano ESP32 and an i2c scan finds it right away.
Which Adafruit MPR121 are you using?
I found a breakout board in my drawer but I'm curious to see if there's something particular about the one you were having trouble with
Its the Adafruit mpr121 for Arduino boards, I wasn't aware it was designed for unos but anyway I just wired up the vin and i2c pins to the nano. Now, interestingly the reset button functioned but I never saw any power lights on the adafruit board.