Changes

Jump to: navigation, search

Students/KimBeswick

41 bytes added, 00:37, 19 March 2010
no edit summary
To do this project, I got a light sensor, and activated the sound depending of if there was enough light past a threshold of 100 coming from the analog input. I used a 47k resistor for maximum range. I took out the batteries of the sound card so that arduino powered it. I tried it with the batteries in, but I couldn't get it to stop playing. I decided to use the threshold instead of a transistor because it didn't work (I thought I might have put it in backwards, but it didn't work facing either direction). This is the code that I finally used:
int sensorPin = 2; // this is for the light sensor input
20
edits

Navigation menu