PCEval / esp32 /level1 /buzzer_basic /src /main_esp.cpp
eunzee's picture
upload Arduino Uno and ESP32 project files
8e53a3e verified
Raw History Blame Contribute Delete
238 Bytes
/*
Use a piezoelectric buzzer to play 262Hz tone.
4 APR 2025 by Blind Author
*/
#include <Arduino.h>
const int BUZZER_PIN = 2;
void setup() {
pinMode(BUZZER_PIN, OUTPUT);
}
void loop() {
tone(BUZZER_PIN, 262, 250);
}