A NodeJS Module to allow you to control the Inkyphat for Raspberry Pi. Based on the Python code available from Pimoroni.
npm install inkyphat
const inkyphat = require('inkyphat')();
async function main() {
await inkyphat.init();
inkyphat.setPixel(1, 5, inkyphat.RED);
inkyphat.drawRect(50, 100, inkyphat.BLACK);
await inkyphat.redraw();
await inkyphat.destroy();
}
main();
npm test
- Run Tests.
npm run coverage
- Run Tests and display coverage.
npm run lint
- Run ES Lint
In lieu of a formal style guide, take care to maintain the existing coding style. Add unit tests for any new or changed functionality. Lint and test your code.