hello everyone,
I'm on a little project for an alarm clock (actually it is a defusable-bomb-alarm-clock)
I'm using the Time and TimeAlarms library to trigger the alarm and the New Tone library to make the buzzer sound: the function below Alarm.alarmRepeat(alarm_hour,alarm_minute,alarm_second, WakeUp)
calls the WakeUp function that trigger the buzzer among other stuff.
When the alarm is switched off (bomb defused), the alarm clock returns to the "time mode" BUT the buzzer keeps going with a little and annoying buzzing.
I also tried something really simple
#include <NewTone.h>
#define tonePin 4
void setup() {
pinMode(tonePin,OUTPUT);
}
void loop() {
NewTone( tonePin, 2000 , 500 );
delay(1000);
noNewTone(tonePin);
delay(2000);
}
but it keeps doing that...
any suggestion?