RPi and micropython

General discussions and questions abound development of code with MicroPython that is not hardware specific.
Target audience: MicroPython Users.
Post Reply
cwrseck
Posts: 2
Joined: Sun Aug 12, 2018 1:44 pm

RPi and micropython

Post by cwrseck » Tue Aug 14, 2018 11:45 am

I've been trying to set up an Embedded Artists epaper board, whose SPI commands turn out to be largely undocumented. One of the better examples runs on MicroPython, so I've been trying to run MicroPython on an RPi zero. The unix version compiles and passes all the tests, but there's no low-level pyb library to handle timing and I/O. Some of the example code (peterhinch/micropython-epaper) seems to be written for the RPi, but I can't find any trace of low-level libraries for the RPi. Does anyone know a source?

Thanks - Will

User avatar
liudr
Posts: 211
Joined: Tue Oct 17, 2017 5:18 am

Re: RPi and micropython

Post by liudr » Tue Aug 14, 2018 5:29 pm

Post links to those resources you're using. That might help those that want to help you to get started.

User avatar
pythoncoder
Posts: 5956
Joined: Fri Jul 18, 2014 8:01 am
Location: UK
Contact:

Re: RPi and micropython

Post by pythoncoder » Fri Aug 17, 2018 5:15 am

cwrseck wrote:
Tue Aug 14, 2018 11:45 am
... Some of the example code (peterhinch/micropython-epaper) seems to be written for the RPi...
My library is for the Pyboard. At the end of my README there are references to the my sources of information. As far as I know nobody has ported a driver to MicroPython on the Pi. It's possible that doing this may be problematic: MicroPython on bare metal can achieve precise timing which is not available when there is an underlying OS.

There is C code available from Embedded Artists for the Pi which works well - using C avoids these potential timing issues.
Peter Hinch
Index to my micropython libraries.

cwrseck
Posts: 2
Joined: Sun Aug 12, 2018 1:44 pm

Re: RPi and micropython

Post by cwrseck » Fri Aug 17, 2018 2:26 pm

Thanks - that answers that question. And I _think_ I;ve found a datasheet from Pervasive Displays
which covers the SPI commands. However, I'd still like to use Python if I can, since your library is
by far the clearest explanation of how to drive the display, and I've looked at a lot of projects.

Thanks for your help (and your library) - Will

User avatar
pythoncoder
Posts: 5956
Joined: Fri Jul 18, 2014 8:01 am
Location: UK
Contact:

Re: RPi and micropython

Post by pythoncoder » Sat Aug 18, 2018 7:18 am

There is a bare metal RPi port. This might be worth trying if you encounter timing issues.
Peter Hinch
Index to my micropython libraries.

jickster
Posts: 629
Joined: Thu Sep 07, 2017 8:57 pm

Re: RPi and micropython

Post by jickster » Thu Aug 23, 2018 9:25 pm

You should rename this topic by spelling out “raspberry” to make it easier to find.

Turbinenreiter
Posts: 288
Joined: Sun May 04, 2014 8:54 am

Re: RPi and micropython

Post by Turbinenreiter » Fri Aug 24, 2018 7:08 am

There is a CircuitPython/MicroPython API compatibility layer which also runs on the Raspberry Pi. It should allow you to run MicroPython drivers on a Raspberry Pi, but I guess it won't be completely out-of-the-box working.

https://learn.adafruit.com/circuitpytho ... x/overview
https://pypi.org/project/Adafruit-Blinka/

Post Reply