Arduino Code:
/*
AnalogReadSerial
Reads an analog input on pin 0, prints the
result to the serial monitor
This
example code is in the public domain.
*/
void setup() {
Serial.begin(9600);
pinMode(3, OUTPUT);
}
void loop() {
int
sensorA = analogRead(A0);
int
sensorB = analogRead(A1);
int
sensorC = analogRead(A2);
if(sensorA < 600 || sensorB < 600 || sensorC < 600){
digitalWrite(3, HIGH);
delay(2000);
digitalWrite(3, LOW);
}
Serial.println(sensorA);
Serial.println(sensorB);
Serial.println(sensorC);
Serial.println(" ");
}
Remember this little guy that I cut open
before I stitched him back up he’s almost as good as new. J
He's been connected to the circuited so when a cigarette butt is thrown into the but bin his job is to dance and sing.
I originally planned to add a casino jackpot sound
to an audio device which would have been the sound to activate the above moving
object however Juliet and others liked the song the toy already sang, so I was
happy to go a long with using its original features, I reckon it seemed
more fun than the casino jackpot sound
anyway.
To be honest I'm more pleased the circuit works. J
To be honest I'm more pleased the circuit works. J
No comments:
Post a Comment