#define LED 2
#define BUZZER 4
void setup() {
{
pinMode(2,OUTPUT);
pinMode(4,OUTPUT);
}
}
void loop()
{
digitalWrite(2,LOW);
delay(500); // this speeds up the simulation
digitalWrite(2,HIGH);
digitalWrite(4,LOW);
delay(1000);
tone(4,500,100);
// this speeds up the simulation
}