|
|
|
@ -33,8 +33,8 @@ void setup() {
|
|
|
|
|
void loop() {
|
|
|
|
|
|
|
|
|
|
digitalWrite( SPEAKER_PIN, LOW ); // 0v to pin 11
|
|
|
|
|
delay( analogRead(A2)*5 ); // wait*10, analogRead gives values between 0-1023, so max wait is 1sec, lets make it ~5sec by multiplying the read value * 5
|
|
|
|
|
delay( analogRead(A2)*5 ); // wait*200, analogRead gives values between 0-1023, so max wait is 1sec, lets make it ~5sec by multiplying the read value * 5
|
|
|
|
|
digitalWrite( SPEAKER_PIN, HIGH ); // +5v to pin 11
|
|
|
|
|
delay( analogRead(A2)*5 ); // wait*10, analogRead gives values between 0-1023, so max wait is 1sec, lets make it ~5sec by multiplying the read value * 5
|
|
|
|
|
delay( analogRead(A2)*5 ); // wait*200, analogRead gives values between 0-1023, so max wait is 1sec, lets make it ~5sec by multiplying the read value * 5
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|