keith-packard / snek

Snek programming language for tiny systems
GNU General Public License v3.0
294 stars 30 forks source link

Support for /sys/class/gpio? #30

Open zoobab opened 4 years ago

zoobab commented 4 years ago

Hi,

Any chance to support /sys/class/gpio under Linux (like most SBC boards have)?

Or via some USB dongle:

http://www.zoobab.com/ch341-usb-spi-i2c-uart-isp-dongle

plaes commented 4 years ago

Up-to-date approach would be /dev/gpiochipX

keith-packard commented 4 years ago

I'd certainly welcome contributions like this -- would be great to have the POSIX Snek also able to drive peripherals! If someone wants to give this a try, I will help anyway I can.

merwok commented 3 years ago

I’m not a C dev but I’ve seen wiringpi used as an abstraction for GPIO. The developer hung his gloves because of bad redistributors, but the library can still be installed (and is kept functional by the community), so it could still be a good option.