Blog: 2024-12-12

From razwiki
Revision as of 23:47, 12 December 2024 by Razzi (talk | contribs) (Created page with "arduino led and buzzer <pre> 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); } </pre>")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
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);
}