Does Qwiic I2C Python Package support RP2040?

Hi,

I can’t get this driver to work with my Raspberry Pi Pico W (RP2040). I get an error when I connect any of Sparfun’s qwiic sensors, despite installing all dependent packages etc.

Here are some examples of sensors:

0.91 in. OLED Display

SparkFun Qwiic OLED Display - Hello Example

Unable to load I2C driver for this platform.
Unable to load the I2C driver for this device
The Qwiic OLED Display isn't connected to the system. Please check your connection

but it shows up on the I2C bus:

Scan i2c bus...
i2c devices found: 1
Decimal address:  60  | Hexa address:  0x3c
Qwiic TMP102 Sensor

SparkFun Qwiic TMP102 Sensor Test Example

Unable to load I2C driver for this platform.
Unable to load the I2C driver for this device
Initialized.
Traceback (most recent call last):
  File "<stdin>", line 27, in <module>
  File "<stdin>", line 21, in runExample
  File "/lib/qwiic_tmp102.py", line 149, in read_temp_f
  File "/lib/qwiic_tmp102.py", line 122, in read_temp_c
AttributeError: 'NoneType' object has no attribute 'readBlock'
 Scan i2c bus...
i2c devices found: 1
Decimal address:  96  | Hexa address:  0x60

I get this error on every qwiic sensor. Does this library not support it, how can I make it work, if someone can help me I would greatly appreciate it.

By the way, I saw such a PR: https://github.com/sparkfun/Qwiic_Py/pull/14

No RP2040 support?

All dependent packages are installed successfully. Can anyone help me figure out why this is so and fix the problem? :oops:

Doesn’t look like the RP2040 is supported. :cry:

The qwiic I2C Python package current supports the following platforms:

Raspberry Pi (Single Board Computers)

NVidia Jetson Nano

Google Coral Development Board

https://github.com/sparkfun/Qwiic_I2C_P … -platforms

Yes, I learned that. What is the alternative best practice for Qwiic sensors for this?

You’re probably going to have to write your own library, at least there are Python and arduino libraries available to use as a reference.

The native library is regular python; it’d need to be compiled for micropython to be used on the rp2040 (like in that PR link); there are some resources available online with instructions for how to do so as well