Tuesday, 10 December 2013

Interactive Devices: Lab 4 Individual Post - Building the prototype

The day before the lab we received the electronic components required to start building our cube; seven rotary encoders. Each works as a rotary encoder, push button and LED. The degree of rotation is not restricted to 360 and it knows whether it's rotating clockwise or counter-clockwise while the button is a simple push down, i.e. it has a binary state. The LED is an RGB LED capable of displaying light of any RGB combination, this means vibration feedback was not needed anymore as we could just give feedback by lighting the LEDs.


With the components in our possession myself and Amir went to the electronic labs to solder each of the eight pins. I soldered the first potentiometer to its circuit board but after thinking about it, we
decided to do away with the boards because otherwise we would never be able to fit all the rotary encoders inside the cube.
When we got back to our lab the whole team started looking at how to connect the rotary encoder to the Arduino board by following a Bildr guide provided by the rotary encoder's page on Sparkfun.




After a fair bit of trial and error with Arduino coding we eventually managed to write a program which received movement data when rotating the encoder. Following from our success we quickly decided to try to get the button to work as well so we connected the push button wires to the Arduino board and edited our program. Soon enough our program could receive both rotation and push data.

No comments:

Post a Comment