1. 首页
  2. 考试认证
  3. 其它
  4. node pi gpio

node pi gpio

上传者: 2024-09-05 22:51:01上传 ZIP文件 4.3KB 热度 1次
Raspberry Pi的GPIO包装器安装$ npm install -S node-pi-gpio用法L chika $ npm run example:l_chika GPIO = require 'node-pi-gpio' pin = 24 time = 500 _loop = (gpio, val)-> gpio.valueval setTimeout _loop, time, gpio, (unless val then 1 else 0) GPIO.open pin, 'out' .then (gpio)-> process.on 'SIGINT', -> gpio.value 0 gpio.close() .then -> process.exit() _loop(gpio, 1) retur
用户评论