Skip to content
German Carro Fernandez edited this page Jul 7, 2014 · 3 revisions

How works

Servo laboratory is a website platform that interacts remotely with hardware laboratory. This hardware laboratory is built in Arduino board and has a servo motor of 180 degrees. So with this repository you can control the position of the servo motor using wbsockets trough Raspberry Pi from any place in the world.

Server side

The file of server side are located into ../js/ folder (server.js). This file manage and open the serial port (Arduino communicaton) and websockets using Raspberry Pi architecture.
Remember load into Arduino board the file located into ../arduino/ folder (servo.ino).

Client side

The file of client side is into ../servo/ folder (index.html). This file uses the bootstrap library and let the client access to a simple interface to manage the values of different positions between 0 and 180 degrees in the servo motor.

How can you interact

When you go to index.html you can see 1 slider. This slider control the position of the ranges used by servo motor (0º-180º). You only have to select your positin and click on the button to send this position to the Raspberry Pi and to Arduino. So the servo motor starts to move to the position selected.

If you need information about the process to install the files into Raspberry Pi, please visit: How to use Node.js and Socket.io laboratories with Raspberry Pi and Arduino