iamdustan / react-hardware

A React renderer for Hardware.
http://iamdustan.com/react-hardware
801 stars 41 forks source link

Compatible with Raspberry Pi #29

Open YarGnawh opened 7 years ago

YarGnawh commented 7 years ago

Just wondering if there's a way to use this library with Raspberry PIs and the GPIO ports.

iamdustan commented 7 years ago

I think you should be able to use something like https://github.com/nebrius/raspi-io and get it working.

IIRC just make an instance of it and pass it in as the second argument and react hardware should proxy through to that as the IO layer.

zachwalton commented 7 years ago

For posterity, got this working just as @iamdustan suggested with a very slight modification to https://github.com/iamdustan/react-hardware/tree/master/examples/johnny-five

https://gist.github.com/zachwalton/721983be1faba20670f3bbd573201404