8x8-matrix 中文文档教程
node-8x8-matrix
使用节点
控制一个 8x8 矩阵 图片来自 Adafruit 商店 https://www.adafruit.com/product/870
使用 run-python 创建
Installation
- Install python
- Install Adafruit Python LED Backpack
- Install
8x8-matrix
$ npm i --save 8x8-matrix
Usage
Load module
const matrix = new (require('8x8-matrix'))
Mark LED to be on or off
// On: x, y, true
matrix.setPixel(0, 0, true)
// Off: x, y, false
matrix.setPixel(1, 0, false)
Write changes to matrix
matrix.writeDisplay()
Turn off all LED's and write changes to matrix
matrix.clear()
matrix.writeDisplay()
node-8x8-matrix
Control an 8x8 matrix with node
Image from Adafruit shop https://www.adafruit.com/product/870
Created using run-python
Installation
- Install python
- Install Adafruit Python LED Backpack
- Install
8x8-matrix
$ npm i --save 8x8-matrix
Usage
Load module
const matrix = new (require('8x8-matrix'))
Mark LED to be on or off
// On: x, y, true
matrix.setPixel(0, 0, true)
// Off: x, y, false
matrix.setPixel(1, 0, false)
Write changes to matrix
matrix.writeDisplay()
Turn off all LED's and write changes to matrix
matrix.clear()
matrix.writeDisplay()
更多
你可能也喜欢
- 1dogeland-uikit 中文文档教程
- 9c-lord-backend 中文文档教程
- @0xc/dialogflow-as-code 中文文档教程
- @3boysdad/serverless-plugin-typescript 中文文档教程
- @4a/enum-code-message 中文文档教程
- @5ire/api-derive 中文文档教程
- @_mehrad/ngx-daterangepicker-material 中文文档教程
- @abcpros/bitcore-p2p 中文文档教程
- @abi-software/mapintegratedvuer 中文文档教程
- @acentdefi/aceswap-uikit 中文文档教程