This blog is dedicated to my Final Year Project which will be an Urban Installation created in an abandoned house, where the 4 seasons are unleashed. Within this blog, you will know how my project has progressed including the problems which I will encounter and also the development of my final piece - Hafiza :D

Tuesday, 27 April 2010

Laser & Light Sensor attached to Turntable

As a back-up I have added a laser and light sensor to the turntable just incase the turntable decides to take over the co-ordinations. This happens as the coding starts to play up sometimes.

Therefore in order to avoid this problem, I have attached a laser in one of the corners of bottom boards of the turntable and attached a light sensor in the same corner but of the top board.

The photograph below shows how the turntable looks:



This photograph is of the strip-board and the Arduino board with the wiring of the resistor and sensor in place:


This is the code used in Arduino to set the laser and light sensor to work:

void loop(){
digitalWrite(15,HIGH);
digitalWrite(13,HIGH);

The coding above is telling the Arduino to turn on the laser and power the light resistor.

if(analogRead(0)>700){
coords=0;
}

The above coding basically states that when the light resistor is triggered, set the current co-ordinates to 0.

No comments:

Post a Comment