This is the node js server for Angduino library. This library can help you easily build a web bases controller for arduino. It uses Angularjs for front end. Check out its arduino library as well that works with it.
##Requrements
- Node js
- Socket io. Installed using npm
- Serial Port. Installed using npm
- Expressjs. Installed using npm
- Sleep. Installed using node js.
Recommended OS is linux.
To run the server, download the zip file, and extract it:
-
Open terminal(linux) or cmd(Windows).
-
Navigate to the main diectory in the zip.
-
Run npm install
-
Connect the arduino to the PC. Then type:
node index.js <Serial Port of arduino> -
In case of linux it looks like /dev/ttyACM0 or AMC(some other number).
-
In windows it looks like COM3 or COM(some other number).
-
You can use arduino ide to check the port name. It's written at the bottom right corner.
-
As soon as you press Enter, server starts. Giving back you the ip and port on which the server is running.
-
Copy and paste it in the browser and you are ready to rock.
##Site
You can see the site folder in the repository. It contains website that will be shown in the browser. You are concerned with index.html. It already consist of a basic example template. The code is pretty self explainatory.
If you want to add a new button, just add these directive to a new <button> tag:
angduino-button="key" off="text when on" on="text when off"
To add serial monitor output add:
<textarea cols="50" rows="10" angduino-serial-out>Welcome. This is you serial output monitor</textarea>
To add serial monitor input add:
<input type="text" cols="50" rows="1" angduino-serial-in ng-model="SerialValue"></input>
##Licence The MIT License (MIT)
#Contributers Karan Purohit
More contributers required.