const int ledPin1 = 2;
const int ledPin2 = 3;
const int ledPin3 = 4;
const int buzzerPin = 5;
const int switchPin1 = 6;
const int switchPin2 = 7;
const int switchPin3 = 8;
void playSound(int frequency, int duration)
{
tone(buzzerPin, frequency);
delay(duration);
noTone(buzzerPin);
}
void setup()
{
// put your setup code here, to run once:
pinMode(ledPin1, OUTPUT);
pinMode(ledPin2, OUTPUT);
pinMode(buzzerPin, OUTPUT);
pinMode(switchPin1, INPUT_PULLUP);
pinMode(switchPin2, INPUT_PULLUP);
}
void loop()
{
// put your main code here, to run repeatedly:
if(digitalRead(switchPin1) == LOW)
{
digitalWrite(ledPin1, HIGH);
delay(500);
digitalWrite(ledPin1, LOW);
delay(500);
digitalWrite(ledPin1, HIGH);
delay(500);
digitalWrite(ledPin1, LOW);
}
if()
}