Live Coding Unicorn Shield

For the Codingworld UG I developed a Webpage to remove control a Coding Unicorn Shield with Socket.IO and a HTTP-API.

I want to build a remote controll Webpage for the Unicorn Project. First i build a HTTP-API with Python-Flask for the Projekt. This HTTP-API can be used for other Projects too. For example i will use it to make a Monitoring System with the Unicorn. The HTTP-API is running on the PI itselfs at a private Network. To allow the communication from outside this network i use a socket.io Server. Its also possible to work with dyndns but i decide to use socket.io because i also can use it at the Webpage and already have a finish webserver with express.js.

The following "Diagram" shows the way the remote control works.

 Draw.io Diagram

At the Webserver (the cloud symbol) running a node server with socket.io and express.js. So i can return a simple html and javascript file for the User. Stylesheet and Javascript files are loadet via a CDN. The Webpage also use socket.io commands to send the user inputs (turn lights on/off or change the color) to the server. 

On the Raspberry Pi is another socket.io client connect to the same socket.io server. The server send all incomming Messages to all Clients so also the Pi get this informations. A possible solution would be to controll the LEDs direckt from the client, but because I already have the finish API i decide to use it (just because it was faster to implement it).

In the Office from the Codingworld UG everything is installed. Additionally there is added a Live-Stream with a Webcame.

The remote-control Webpage is visible until the end of the kickstarter campain at unicorn.codingworld.io.

 



Veröffentlicht: 06.08.2017