【文件属性】:
文件名称:gpio:具有ES6的Raspberry-Pi PWM GPIO适配器
文件大小:51KB
文件格式:ZIP
更新时间:2021-05-15 18:39:23
analog raspberry-gpio JavaScript
Gpio(测试版)
使用Node.js和ES6 Promises控制Raspberry Pi GPIO引脚。
目录
设置
然后可以使用npm安装此模块:
# npm install @jdes/gpio # unavailable during beta
npm install git://github.com/jeandesravines/gpio
用法
!! 重要的 !! 您必须以root用户身份运行应用程序才能使用Raspberry的GPIO。
导入模块:
/**
* @class {Gpio}
*/
const Gpio = require ( '@jdes/gpio' ) ;
实例化:
/**
* @type {Gpio}
*/
const gpio = new Gpio ( ) ;
在通道上进行所有操作之前,必须使用gpio.open(channel
【文件预览】:
gpio-master
----.travis.yml(217B)
----package.json(2KB)
----.eslintrc.json(124B)
----test()
--------index.js(464B)
--------error()
--------configuration()
--------helper()
----yarn-error.log(71KB)
----LICENSE(1KB)
----.gitignore(42B)
----lib()
--------error()
--------configuration()
--------helper()
----README.md(7KB)
----yarn.lock(56KB)