Async raspberry pi gpio events in nodejs

后端 未结 4 1318
伪装坚强ぢ
伪装坚强ぢ 2021-02-04 00:09

I connected a button to the Raspberry Pi GPIO ports:

\"http://adafruit.com/products/801\"

The pi-gpio node

4条回答
  •  梦谈多话
    2021-02-04 00:57

    I'd suggest using the module called onoff.

    It has the ability to watch a value-file while not taxing the cpu with polling in intervals.

    I made a small test-app with node.js to try out leds and buttons with it, you can check it out here.

提交回复
热议问题