The name is inspired from Real Steel. This is just a prototype made using ruby libraries, arduino microcontroller board and raspberry pi. The idea is to control a system or hardware from anywhere around the globe by the help of internet. What are actually the ruby libraries and how do those help?
The concept is based on web-socket server. The server accepts websocket connections on some port (let it be 8080). The server is written by the help of em-websocket ruby. Clients are connected to it by opening the websocket connections at the same port. And as soon as a client is connected, it gets associated with a channel(internal channel). And when a client sends a message, it’s pushed to that channel and after that the same message can be sent to all connected clients.
Here comes another ruby gem called the serialport. This gem is built to use RS-232 serialports. In the client code we can also create a object of serialport. And by the help of that object we can send that same message(here it’s only a single character like ‘a’) to the serialport. So now the other client can receive the message from the browser client through the websocket channel and send that to the serialport. Why to send that message (character) to the serialport?
Arduino is a microcontroller board which has UART (universal asynchronous receiver and transmitter). This UART helps that board to receive the commands coming to it over the serialport. After getting the command(the command I am referring here is a character constant like 'a’), it can process the output accordingly. How can it know what to perform while that exact command is received? It can all be written in the Arduino IDE and uploaded to that board to do the required tasks. Isn’t that awesome? Arduino has IO ports and with the help of those anything at the output can be connected.
RaspberryPi is a credit-card sized computer (linux based) which can be easily connected to the arduino through its serialport(USB) and it can be connected to the internet over wifi. This can be the device in which the client code can be executed. :) :)
The source-code :
This system can help us in many ways like
1. We can automate our home like we can turn on our oven just before reaching home or we can check if the door is locked or not. 2. Security notifications can be sent as a app notification over the internet. 3. Can be used in hospitals and in traffic systems
And a lot of things can be developed with this. :)