VoCore, Micropython and the SYSFS

As I wrote a while ago I was not able to access the Kernels SYSFS through the build-in „open/read/write“ methods from micropython. I thought this might be because of the old version of micropython which comes from the OpenWrt binary repository, but even rebuilding OpenWrt did’t change anything.

Then I realized, there is FFI (foreigen function interface) support build into micropython. This allowed me to wrap the libc’s open/read/write operations directly into micropython. And finally, when using the wrapped libc methods, I am able to blink a LED from micropython on the VoCore. The source for this looks like so:

Leave a Reply

You must be logged in to post a comment.