Page 1 of 1

Micropython Unix port on Raspberry Pi - I2C/SPI?

Posted: Mon Aug 03, 2020 8:36 pm
by gersch07
Dear all,

I've been recently experimenting a bit with Micropython's Unix port on the Raspberry Pi 3B+ (with Raspberry Pi OS) and found it really nice & lightweight. However, there is unfortunately no support for I2C or SPI required to communicate with most sensors and displays... Is it possible (with reasonable effort) to generate bindings to one the following C libraries (for which Python bindings already exist)? I'm currently exploring the automated generator script "" used to create bindings for the LVGL graphics library ( ... d080abe9b2). For the SMBus library, it indeed does produce C code, but I haven't been able to include that into the Micropython source code and was hoping for a simpler method...

I saw that there is a git repo containing a bare-metal port for the Raspberry Pi 1/Zero (with Broadcom BCM2835 CPU), however that library won't work for newer models, I guess...
Thanks for your help in advance!

Re: Micropython Unix port on Raspberry Pi - I2C/SPI?

Posted: Wed Aug 05, 2020 4:49 pm
by dlech