https://github.com/pbertie/inkyphat-node
NodeJS Module to control Inky pHAT on Raspberry Pi (e-Paper Screen).
https://github.com/pbertie/inkyphat-node
e-paper epaper-screen inky node node-js node-module nodejs nodejs-modules phat pimoroni raspberry-pi
Last synced: 4 months ago
JSON representation
NodeJS Module to control Inky pHAT on Raspberry Pi (e-Paper Screen).
- Host: GitHub
- URL: https://github.com/pbertie/inkyphat-node
- Owner: pbertie
- License: mit
- Created: 2018-01-12T21:36:53.000Z (almost 8 years ago)
- Default Branch: master
- Last Pushed: 2024-09-11T21:38:27.000Z (over 1 year ago)
- Last Synced: 2024-12-15T12:11:31.395Z (about 1 year ago)
- Topics: e-paper, epaper-screen, inky, node, node-js, node-module, nodejs, nodejs-modules, phat, pimoroni, raspberry-pi
- Language: JavaScript
- Homepage: https://www.npmjs.com/package/inkyphat
- Size: 1.33 MB
- Stars: 33
- Watchers: 2
- Forks: 1
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# inkyphat
[](https://travis-ci.org/pbertie/inkyphat-node) [](https://coveralls.io/github/pbertie/inkyphat-node?branch=master) [](https://david-dm.org/pbertie/inkyphat) [](https://david-dm.org/pbertie/inkyphat?type=dev) [](https://www.npmjs.com/package/inkyphat) [](https://www.npmjs.com/package/inkyphat)
A NodeJS Module to allow you to control the Inkyphat for Raspberry Pi. Based on the Python code available from [Pimoroni](https://github.com/pimoroni/inky-phat).
## Installation
`npm install inkyphat`
## Usage
```js
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();
```
## Tests
`npm test` - Run Tests.
`npm run coverage` - Run Tests and display coverage.
`npm run lint` - Run ES Lint
## Contributing
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.