代码
#define buzzer 3 int i = 0; void setup() { pinMode(buzzer, OUTPUT); digitalWrite(buzzer, LOW); Serial.begin(9600); // setup serial } void loop() { digitalWrite(buzzer, HIGH); delay(1000); digitalWrite(buzzer, LOW); delay(1000); }
代码
#define buzzer 3 int i = 0; void setup() { pinMode(buzzer, OUTPUT); digitalWrite(buzzer, LOW); Serial.begin(9600); // setup serial } void loop() { digitalWrite(buzzer, HIGH); delay(1000); digitalWrite(buzzer, LOW); delay(1000); }