I have just purchased an OTOS board and have it hooked up to a Pico-W on pins 2 and 3, with power from 3V3. The code below in my Thonny terminal shows the device is not detected:
>>> import qwiic_i2c
>>> my_bus = qwiic_i2c.get_i2c_driver(sda=2, scl=3, freq=100000)
>>> scan_list = my_bus.scan()
>>> print("Bus scan:", scan_list)
Bus scan: []
Just to make sure the qwiic_i2c code works, I substituted another (VCSEL) device in its place and got Bus scan: [41]
. So it looks like the qwiic_i2c code is OK.
Does this mean my OTOS board is defective?
I’m not sure how you’re using i2c on pins 2&3 with a pico-w Raspberry Pi Pico W: high-resolution pinout and specs – Renzo Mischianti ; 3 is a ground?
Try using the default i2c pins 6 & 7 and re-scan
You can also run i2cdetect from the console as an alternative way to check the i2c bus.
Share a photo of your setup/wiring
Thanks for your reply. I am using pins GP2 and GP3, not physical pins #2 and 3. See attached photo of the setup.
I did try your suggestion of using pins GP6 and GP7 (and changing it in the code as well) but got the same result. No I2C address was found.
-Doug
You also suggested using the micropython builtin I2C scanner, so I did that as well (still hooked up on pins 6&7).
Same result. No i2c device !
(Attachment i2c_scanner.py is missing)
Blue is SDA and yellow is SCL; they look reversed in your setup vs normal, try flipping those around
When using gpio 2 & 3 be sure to call i2c1, if using 6&7 i2c0
Yes, that works. Silly me!
Thank you!