Connecting SparkFun Pro Micro - RP2350 to Optical Tracking Odometry sensor (OTOS)

I trying to use the new OTOS board connected to the pro micro rp2350. I have the qwiic packages installed and trying to program in micropython using Thonny. I can program the rpi but cant get it to connect to the OTOS. Im not sure if its a problem with the i2c drivers or not.

I followed the hardware setup and tested to confirm correct installation by importing qwiic_i2c followed by qwiic_i2c.get_i2c_driver().scan() and received no errors.

However, when testing qwiic_otos.QwiicOTOS().is_connected() it says false.

Not sure how to get around this but it may likely be due to my inexperience with micropython as well as it being my first time using Thonny. Any help will be greatly appreciated!

Also, the PWR led is lit up on the OTOS, I dont think its a physical connection issue

To be sure, you grabbed the i2c_py version, right? Python - SparkFun Optical Tracking Odometry Sensor - PAA5160E1 (Qwiic) Hookup Guide

Also: did you get the OTOS package as well?

If yes to both: do you happen to have another qwiic device you can test? It might help to share a photo of your setup as well

I just redid everything using CircuitPython in the Mu editor and it works now. Should I stick to this or is Micropython or something else reccomended higher?

Could the micropython firmware for the pro micro rp2350 be the issue? The version used was a beta

Perhaps, although our instructions do say to use the beta version…

But, happy to hear Circuitpython is working - I would definitely stick with the working modus for now! :wink:

HI @KadenC64 -

First, I’ll have someone take a look at this - we’re in the middle of some big updates to our python (normal, micro, circuit) support. If there’s an issue with micro py, we’ll get it fixed

It’s worth noting that the core of our libraries is the same on python, micro python and circuit python - just the communication driver is different. So it could be a driver issue, or a firmware issue.

As for which to py to use - micro or circuit - it’s really up to you’re needs. Micro python on the rp2350 is supported by Raspberry Pi, so it’s solid, but the Circuit Python team are very active also.

-Kirk

I followed the hardware setup and tested to confirm correct installation by importing qwiic_i2c followed by qwiic_i2c.get_i2c_driver().scan() and received no errors.

Good that qwiic_i2c.get_i2c_driver().scan() doesn’t give any errors, but what does it return? Does it return []? If so, that means it doesn’t find any devices during a scan.

I suspect the problem is that our MicroPython I2C driver implementation is defaulting to the wrong pins. Please try the following with the OTOS connected:

import qwiic_i2c
i2c = qwiic_i2c.get_i2c_driver(sda=16, scl=17)
print(i2c.scan())

If it works, it should print [23]. If so, then use the following:

otos = qwiic_otos.QwiicOTOS(i2c_driver = i2c)
print(otos.is_connected())

Which should print True. If so, then it’s working fine and you should be able to continue with the examples.

Hope this helps!

It did return [] previously, and I tried your steps and it printed true!

But… even though it printed true, when I try to run an example code it prints:

Qwiic OTOS Example 1 - Basic Readings

The device isn't connected to the system. Please check your connection

If I use qwiic_otos.QwiicOTOS().is_connected() it still returns False

I would like to use micropython and It seems I am closer to get it working but not sure why it still wont run

Nevermind I got it working by adding your lines of code to the example code. Is there a way to fix the default pins? If not its okay, I understand how to fix it know and I appreciate it a lot! Thank you!

Great to hear you got it working!

The default pin selection is something we’re working on right now. Right now, the Qwiic_I2C_Py driver has no way to know whether I2C0 or I2C1 is the default for the board. Once this pull request for MicroPython to go through: feature/optional_i2c_bus by malcolm-sparkfun · Pull Request #16671 · micropython/micropython · GitHub we will update it to select the default for the board.

This will take some time. For now, you’ll have to manually specify the pins.