led-matrix-controllers
v0.2.9
Published
Cross-firmware controllers for the [Framework Laptop 16 LED matrix module](https://frame.work/products/16-led-matrix) using WebHID and Web Serial APIs
Downloads
19
Readme
LED Matrix Controllers
Cross-firmware controllers for the Framework Laptop 16 LED matrix module using WebHID and Web Serial APIs
Supported Firmwares
- FrameworkComputer/inputmodule-rs (Out-of-box default)
- vddCore/sparkle-fw16
- sigroot/FW_LED_Matrix_Firmware
If you maintain another firmware or a fork, please open an issue or submit a PR!
Quick Start
Installation
Node.js
npm install led-matrix-controllersCDN
<script type="importmap">
{
"imports": {
"led-matrix-controllers": "https://esm.sh/led-matrix-controllers@latest"
}
}
</script>Usage
For specific firmware
// Controllers for specific firmware
import { DefaultController, SigrootController, SparkleController } from 'led-matrix-controllers';
const controller = new DefaultController();
await controller.connect();
await controller.draw( /* 34x9 array of arrays of 0 to 1.0 */ );For specific interface
import { HardwareControllerFactory } from 'led-matrix-controllers';
// connect to device
const serialController = HardwareControllerFactory.detectSerial();
const hidController = HardwareControllerFactory.detectHID();Development
Prerequisites
- Node.js (v18 or later)
Installation
Setup development environment
npm installBundle (optional)
npm run build