#define LED 4
#define buzzer 5
void setup() {
// put your setup code here, to run once:
Serial.begin(115200);
pinMode(LED, OUTPUT);
pinMode(buzzer, OUTPUT);
}
void loop() {
// put your main code here, to run repeatedly:
digitalWrite(LED, HIGH); // LED ON
delay(1000); // this speeds up the simulation
tone(buzzer, 500,1000);
delay(1000); // this speeds up the simulation
digitalWrite(LED, LOW); //LED OFF
delay(1000); // this speeds up the simulation
tone(buzzer, 100,1000);
delay(1000); // this speeds up the simulation
}
Loading
esp32-c3-devkitm-1
esp32-c3-devkitm-1