【文件属性】:
文件名称:raspi-ver:在节点中以编程方式检查您的pi板版本和其他位
文件大小:6KB
文件格式:ZIP
更新时间:2021-05-26 20:35:40
nodejs raspberry-pi node raspberrypi raspberry
拉斯皮尔
快速编程检查您的Raspberry Pi板版本,内存和其他位。
安装
npm install --save-dev raspi-ver
用法
需要在您自己的模块中,并直接访问公开的属性。
let rpi = require('raspi-ver');
if (rpi.model === "Model B") {
console.log("PROFIT");
}
原料药
模块的公开属性。
rpi.revision:主板的硬件版本代码。
rpi.relDate:模型的发布日期。 格式的字符串(“ 2016年第一季度”)。
rpi.model:主板的型号名称。 类似于“ Model B”的字符串。
rpi.PCBRev:电路板的硬件版本。 像“ 1.0”这样的字符串。
rpi.memory:主板的出厂内存。 字符串,例如“ 256 MB”。
rpi.note
【文件预览】:
raspi-ver-master
----lib()
--------versions.json(7KB)
--------index.js(1KB)
----.travis.yml(170B)
----LICENSE(1KB)
----test()
--------index.test.js(3KB)
----.gitignore(32B)
----readme.md(2KB)
----package.json(1KB)