void setup() {
// put your setup code here, to run once:
pinMode(5, OUTPUT);
}
void loop() {
// put your main code here, to run repeatedly:
digitalWrite(5, HIGH);
delay(1000);
digitalWrite(5, LOW);
delay(1000);
}
And the circuit below:
Nothing, not a sound.
Then a tried to change the pins and, when i plugged in the digital pin 12, bingo, got teh BIP.
Well, what's wrong with my board?
Shouldn't the logical pinout be the same as the physical?
The pin numbers printed on the board are exactly what you use in the sketch, so if pin 5 does not work for you and pin 9 does then either the Uno is broken or your wiring is wrong
In the photos you appear to have the + side of the buzzer connected to GND. Check your wiring
UKHeliBob:
The pin numbers printed on the board are exactly what you use in the sketch, so if pin 5 does not work for you and pin 9 does then either the Uno is broken or your wiring is wrong
In the photos you appear to have the + side of the buzzer connected to GND. Check your wiring
Are you sure your code is being uploaded to the UNO? The blink sketch is typically pre-programmed onto new UNO boards, which is what causes the onboard LED to blink, and is also driving pin 13.
Try using Pin 13 (a.k.a. LED_BUILTIN). If the built-in LED doesn't blink, something is wrong with your installation of Arduino. If the LED does blink and the beeper doesn't beep, there is something wrong with your beeper or wiring.