-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
1fb3ed0
commit 270cdd2
Showing
6 changed files
with
60 additions
and
100 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,60 @@ | ||
# express-pi-controller | ||
This is a very simple application for controlling GPIO sensors on a Raspberry Pi. It uses NodeJs, Express and the OnOff package. | ||
Use at your own risk. | ||
|
||
This is a very simple application for controlling GPIO sensors on a [Raspberry Pi](https://www.raspberrypi.org/). It uses [node](http://nodejs.org), [Express](http://expressjs.com/) and the [OnOff](https://www.npmjs.com/package/onoff) package. | ||
Use at your own risk. | ||
|
||
|
||
## Installation | ||
|
||
```bash | ||
$ npm install express-pi-controller | ||
``` | ||
|
||
|
||
## Features | ||
|
||
* Controls any GPIO you have connected | ||
* Config file to enable/disable every GPIO | ||
* Button On/Off to enable/disable the app | ||
* Status Led that shows if the app is enabled | ||
* A web service API based on JSON | ||
|
||
|
||
## Quick start | ||
|
||
```bash | ||
cd node_modules/express-pi-controller | ||
sudo npm start | ||
``` | ||
Then go to the http://127.0.0.1 in a web browser | ||
|
||
|
||
## Configure | ||
|
||
Edit the file model\bcms.json | ||
|
||
## Default values | ||
|
||
* BCM 17: Led | ||
* BCM 18: Led | ||
* BCM 24: Status Led | ||
* BCM 25: Button | ||
|
||
|
||
## Use of the JSON API | ||
|
||
* "/:type(led|button|status_led)" -> Return JSON of enabled items | ||
* "/:type(led|button|status_led)/:item(\\d+) -> Return JSON of an specific item | ||
* "/:type(led)/:item(\\d+)/on" -> Switch on a led (obviously, only for leds). | ||
* "/:type(led)/:item(\\d+)/off" -> Switch off a led (obviously, only for leds). | ||
* "/:type(led)/:item(\\d+)/switch" -> Switch a led (obviously, only for leds). | ||
|
||
|
||
## People | ||
|
||
The author of this module is [Aaron Planell](mailto:aaronplanell@gmail.com) | ||
|
||
|
||
## License | ||
|
||
[GNU](LICENSE) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.