vsergeev / lua-periphery

A Lua library for peripheral I/O (GPIO, LED, PWM, SPI, I2C, MMIO, Serial) in Linux.
MIT License
182 stars 38 forks source link

Is there something I can just drop onto a raspberry pi zero? #30

Closed cinderblockgames closed 2 months ago

cinderblockgames commented 4 months ago

I'm using a Keybow MINI on a raspberry pi zero w, which has a very stripped-down OS and is difficult to connect to. You add files to it by just dropping them onto the sd card. I want to add a passive buzzer, and this looks promising. What's the best way to get something I can just drop onto the sd card and use from lua?

vsergeev commented 2 months ago

It'll probably be easiest to build it directly on the Pi. But, if lua is already installed on the Pi OS and you have a cross-compiler on your host computer, you could cross-compile ( https://github.com/vsergeev/lua-periphery?tab=readme-ov-file#cross-compiling-from-source ) lua-periphery and drop the periphery.so onto the SD Card. That should be enough to load it and use it.