johnwasser:
How about this? Sometimes delay() is the right answer for simple sketches.const byte LEDpin = 8;
const byte BuzzerPin = 12;
void setup() {
// put your setup code here, to run once:
pinMode(LEDPin, OUTPUT);
pinMode(BuzzerPin, OUTPUT);
}
void loop() {
digitalWrite(LEDPin , HIGH);
digitalWrite(BuzzerPin, HIGH);
delay(2000);
digitalWrite(BuzzerPin, LOW);
delay(6000);
digitalWrite(LEDPin, LOW);
delay(8000);
}
A lot of thanks for your reply ... But delay freezes my program ..and I can't add any timing sentences ...