// Fire Evac System
// Pin layout
#define SPK_PIN 23
#define LED_PIN 22
void setup() {
// put your setup code here, to run once:
Serial.begin(115200);
Serial.println("Hello, ESP32!");
// Setup pins
pinMode(SPK_PIN, OUTPUT);
pinMode(LED_PIN, OUTPUT);
}
void loop() {
// put your main code here, to run repeatedly:
for(int times=0; times<3; times++) {
digitalWrite(LED_PIN, HIGH);
tone(SPK_PIN, 900, 500);
digitalWrite(LED_PIN, LOW);
delay(1000); // this speeds up the simulation
}
digitalWrite(LED_PIN, HIGH);
digitalWrite(LED_PIN, LOW);
delay(1000);
}