Led On / Off example for the Raspberry PI 2, using ExpressJS, Fivdi's On/Off and Sarfata's pi-blaster
- A Raspberry PI (ofc)
- Node, npm and Sarfata's pi-blaster installed
- A breadboard, some led and wire
- Clone this repository somewhere in your Raspberry Pi
- Navigate via terminal to the folder where you cloned the repo and run npm install
- Run npm start. If nothing blows up you should open a browser and go to http://localhost:3000 and see a webpage with some controls
NOTE: The webpage's index.html is a messy mixture of AngularJs Material markup and Bootstrap.
- On / Off control via a switch like input
- Intensity control via slider like input
- On / off control via "press and hold" like input
- Text to morse code
If you have no idea how to set up the led with your raspberry here's some usefull link, credits to [@arvindr21] (https://github.com/arvindr21):
[Raspberry Pi, Node.js and a LED โ Emit Morse Code] (http://thejackalofjavascript.com/raspberry-pi-node-js-led-emit-morse-code/)