int LED = 4;
int beep=5;
int pause = 2000;
void setup()
{
pinMode(LED, OUTPUT); //pin controls the LED
pinMode(beep, OUTPUT); //pin controls the speaker
}
void loop()
{
digitalWrite(LED, HIGH); //turn on the LED
digitalWrite(beep, HIGH); //turn on the speaker
//tone(8, 262, 1000); // put your main code here, to run repeatedly:
delay(pause); //wait for 1000 milliseconds (sound and light)
//digitalWrite(LED, LOW); //turn off the LED
//digitalWrite(beep, LOW); //turn off the speaker
//delay(pause);
}