Workshop – Open Sound Control

In the workshop, Rob taught us about open sound control which is a protocol for sending data from different devices over the web.

Screenshot_2015-12-07-10-42-38

The Control Interface used to send accelerometer data to the Mac

puredata

The Pure Data Extended Interface

I used a program called Control which used this protocol to send the accelerometer data from my phone to a Mac. As my phone was on the same Wifi network on the Mac we used a program called Pure Data Extended to listen to the port my phone was sending the accelerometer data, and this data was then routed to the speakers to make a sound.

This made me think that I could use the Open Sound Control for my project to send my accelerometer data from my toy to the web using a Wifi module to connect to the internet.

1438017058694-P-2855099

 

ESP8266 Serial WiFi Wireless Module (Gearbest, 2015)

 

20151207_102605

Controlling an Arduino through Node

This is the code used to make the LED blink.

At the moment I have been using the Node package johnny-five to control my Arduino, which uses a similar protocol. In my test above, I ran tests to make the LED of the Arduino blink through javascript. Later this script can be embedded into a website rather than run through the console.

My thinking is that my app will send data requests through Wifi to the arduino which will then send back the accelerometer data it has recorded. However this may have problems where the arduino needs to connect and disconnect to the Wifi. If this does not work there are some other options I can take, such as using a Bluetooth module instead where a Bluetooth enabled device can request the data and if even this fails I can use a cable connection to send the data.

Wikipedia, 2015. Open Sound Control. [online] Available from: https://en.wikipedia.org/wiki/Open_Sound_Control [Accessed 30 Nov. 2015].

Gearbest, 2015. ESP8266 Serial WiFi Wireless Module. [online] http://www.gearbest.com. Available from: http://www.gearbest.com/transmitters-receivers-module/pp_218376.html?currency=GBP&gclid=CPCKseHLyckCFYRf2wodi8IGyw [Accessed 7 Dec. 2015].

Johnny-Five, 2015. Johnny-Five is the JavaScript Robotics Programming Framework. [online] Available from: http://johnny-five.io/ [Accessed 7 Dec. 2015].