I found lots of similar questions in the past, but time passes, and what was a good suggestion two+ years ago may not still be the way to go today, so...
I need to drive a couple of devices (a clock generator and a DAC) via I2C with a RPi Zero 2.
The Pi is an "upgrade" from an ESP32, and doing that with the ESP and Micropython is dead easy. I thought it would have been as easy with "true" Python and the Pi, but I was wrong.
I'm prototyping, so Python is preferred, but if I have to use C/C++ be it (I would really prefer Rust if I have to compiled but, again, it's prototyping at this point).
First of all I found no supported Python lib using async. smbus is abandonware, then you have smbus2 and smbus3, but they are using soft-I2C and, while I'm sure the Zero if fast enough to cope with that with no problems, the fact of having hardware support for I2C and not using it seems just plain odd to me. It's also hard for me to understand which among these (and maybe others) are considered "canon" at this point.
So what are the current suggested solutions to drive I2C devices from Python and/or native code at this point in time? Thanks!
I need to drive a couple of devices (a clock generator and a DAC) via I2C with a RPi Zero 2.
The Pi is an "upgrade" from an ESP32, and doing that with the ESP and Micropython is dead easy. I thought it would have been as easy with "true" Python and the Pi, but I was wrong.
I'm prototyping, so Python is preferred, but if I have to use C/C++ be it (I would really prefer Rust if I have to compiled but, again, it's prototyping at this point).
First of all I found no supported Python lib using async. smbus is abandonware, then you have smbus2 and smbus3, but they are using soft-I2C and, while I'm sure the Zero if fast enough to cope with that with no problems, the fact of having hardware support for I2C and not using it seems just plain odd to me. It's also hard for me to understand which among these (and maybe others) are considered "canon" at this point.
So what are the current suggested solutions to drive I2C devices from Python and/or native code at this point in time? Thanks!
Statistics: Posted by morci — Mon Mar 24, 2025 9:09 am