js-gpiozero

1.2.4 • Public • Published

js-gpiozero

Build Tests Code Coverage npm version NSP Status bitHound Dependencies bitHound Code bitHound Overall Score semantic-release

A port of the fanastic python gpiozero to javascript creating simple interface to everyday GPIO components used with Raspberry Pi on node.js.

It's early days and a work in progress!

Documentation

The API Documentation is available at the repos github-pages.

Using

First of all we need to be running the latest version of nodejs (at least v6). The following command updates the Debian apt package repository to include the NodeSource packages

$curl -sL https://deb.nodesource.com/setup_7.x | sudo -E bash -

Now that we have added the NodeSource package repository, we can move on and install Node.js!

$ sudo apt install nodejs

We can then test and see what version of Node we are running

$ node -v
v7.3.0
 

Contributing contributions welcome Commitizen friendly

The project is very much a work in progress. Some far the output part of gpiozero has been followed through, completing a near direct translation from the original Python. This means the operating model hasn't really taken advantage of the nodejs programming paradigm. That's next! It's mostly written in EMCAScript 5 with a splash of 6, the intention is to written everything in 6, then use babel to create an output that nodejs can use. The projects tab shows current work, planned and in progress, feel free to pick up a task and have a go.

The documentation is produced by jsdoc, enabling the api documentation to be written within the source code. Upon committing to git, a pre-commit task will run, this runs all tests and updates the documentation. Checkout Git Hooks for more info.

To enable this the follow line needs to be executed:

$ln -s ../../pre-commit.sh .git/hooks/pre-commit

or you can simply run the following command:

$npm run docs

More info about contributing can be found here

NPM

Package Sidebar

Install

npm i js-gpiozero

Weekly Downloads

2

Version

1.2.4

License

ISC

Last publish

Collaborators

  • miketrebilcock