Another project who likes to play around raspberry pi and are interested in scripting. The attempt by Dennis Schulte, in his blog post, have showed how to set up and implement a control software for switches at home quickly with some modern JavaScript stuff. Java developers and other people must understand that Java code used here are technical C++-code.
Requirements
For building this technical project, you will need the hardware like Raspberry Pi, 433 MHz Sender, SD Card with an installed Raspian “wheezy” operating system, 4 Jumper Cables and some RC switches.
Working
Install the Raspberry Pi Hardware to connect the 433 MHz Sender to the GPIO pins of the Raspberry Pi in order to start hacking. In case, you don’t have raspberry pi and want to include AngularJS, then you can skip this step and use the mock implementation of the REST server.
Angular Seed is an application template for a typical AngularJS web app which is used to bootstrap the development environment very quickly. Since it is equipped with some tests and a web-server, we do not to setup a complete infrastructure to start hacking
Next Raspberry Pi Software is installed and SSH in the raspberry-configuration is activated. Now wiringPi is installed and then the library for accessing the GPIO pins of the Pi. Depending upon the switches you have at home, the steps can be changed. The author for his Rev-devices added a sendRev-command to the Repo. Then node.js is installed
Now the hacking starts and the creation of the REST Server. Start designing and documenting the API and then implement the REST Server with Express. After some JavaScript hacking. The framework Express works on top of node.js. The basic code to setup http server with Express is also available with Github.
Now configure your devices which you want to operate through the REST Server and test it also with curl. It is time to create the GUI with AngularJS and Twitter Bootstrap after the Server is finished. Start designing the GUI with the help of CSS-Framework Twitter Bootstrap, as it’s very easy to create a responsive user interface with a minimal effort of time and knowledge about GUI-Design. The final step is to create a button. AngularJS is added to make the static HTML Template more dynamic
Start the servers in the backround. As the frameworks and technologies in the context of JavaScript improved a lot over the last years, it provides lots of room to do different stuffs like grunting for build management.
Video and complete details of the project is available on the website.
Filed Under: Reviews
Questions related to this article?
👉Ask and discuss on EDAboard.com and Electro-Tech-Online.com forums.
Tell Us What You Think!!
You must be logged in to post a comment.