Micropython Unix port on Raspberry Pi - I2C/SPI?

Discussion and questions about boards that can run MicroPython but don't have a dedicated forum.
Target audience: Everyone interested in running MicroPython on other hardware.
Post Reply
Posts: 3
Joined: Sun Jan 26, 2020 10:00 pm

Micropython Unix port on Raspberry Pi - I2C/SPI?

Post by gersch07 » Mon Aug 03, 2020 8:36 pm

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 "gen_mpy.py" used to create bindings for the LVGL graphics library (https://github.com/lvgl/lv_binding_micr ... 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!

User avatar
Posts: 1
Joined: Wed Aug 05, 2020 4:39 pm

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

Post by dlech » Wed Aug 05, 2020 4:49 pm

Post Reply