Live Web > Phone Gyro to Servo Motor

This week I decided to treat the Yun as a websocket server so that I could control a motor remotely. The environment I setup was structure like this:

A remote node server running handles the incoming data from the phone’s gyro sensor. The node server then rounds the values down to the closest integer (ie. 45.929329329 is converted to 45) and transmits the data to a node ws server running on the Arduino Yun’s linux environment as a string – this seems to be a limitation of node WS. As the values are transferred from the Yun’s linux environment to the arduino’s processor, they are converted to integers and then used to control the servo’s angle.

Github repo here:



Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>