Blog: 2024-12-12
Jump to navigation
Jump to search
arduino led and buzzer
void setup() { // put your setup code here, to run once: //pinMode(LED_BUILTIN, OUTPUT); pinMode(13, OUTPUT); pinMode(12, OUTPUT); pinMode(9, OUTPUT); } void loop() { // put your main code here, to run repeatedly: digitalWrite(13, HIGH); digitalWrite(12, LOW); //tone(9, 16000); tone(9, 440); delay(1000); //tone(9, 10); noTone(9); digitalWrite(13, LOW); digitalWrite(12, HIGH); delay(1000); }