1.0.4 • Published 9 years ago

rpi-rest-leds v1.0.4

Weekly downloads
2
License
MIT
Repository
github
Last release
9 years ago

rpi-rest-leds

Controlling 3 LEDs using the Raspberry Pi's GPIO via a REST API

NPM Version

The default setup is for using 3 LEDs connected to GPIO #9,10,11, as used by the Pi Traffic Light board.

Go into the node-api folder to get to the code, and the raml-doc folder for RAML and Markdown documentation of the API.

requires:

node-api

This is the folder with all the code for the API back-end.

Setup

To setup for running the code, run npm install inside this directory. That should install all needed dependencies as listed in package.json.

Then to start the API server, run node server.js in this directory.

Or you can install with npm by running npm install -g rpi-rest-leds, then run the server with rpi-rest-leds in the command line.

The default port for accessing the server is 8080, so the base url is http://YOUR_RPI_IP:8080/node-api, of course replacing YOUR_RPI_IP with the IP address of your raspberry pi!

The LED control API would be at: http://YOUR_RPI_IP:8080/node-api/leds

For more documentation look in ../raml-doc folder.

1.0.4

9 years ago

1.0.3

9 years ago

1.0.2

9 years ago

1.0.1

9 years ago

1.0.0

9 years ago