Hey all! I hope this is in the right place in the forum.
I recently got myself one of these: https://learn.adafruit.com/adafruit-mac ... 40/arduino and am programming it with Arduino. I can upload new sketches just fine, but when I uncomment the speaker code in the setup() function, no sound is produced from the board. I have also tried adding a tone call to the loop() when the encoder button is pressed, but no luck there either. Any ideas?
Thanks in advance!
Adafruit MacroPad RP2040 no buzzer sound
Moderators: adafruit_support_bill, adafruit
Please be positive and constructive with your questions and comments.
- snappawapa
- Posts: 21
- Joined: Tue Oct 15, 2013 7:50 pm
Re: Adafruit MacroPad RP2040 no buzzer sound
Realized I wasn't clear what code I am using. I am referencing the demo code on the page linked.
- adafruit_support_carter
- Posts: 29056
- Joined: Tue Nov 29, 2016 2:45 pm
Re: Adafruit MacroPad RP2040 no buzzer sound
You'll need to also enable the speaker by setting PIN_SPEAKER_ENABLE to HIGH.
Code: Select all
pinMode(PIN_SPEAKER_ENABLE, OUTPUT);
digitalWrite(PIN_SPEAKER_ENABLE, HIGH);
- snappawapa
- Posts: 21
- Joined: Tue Oct 15, 2013 7:50 pm
Re: Adafruit MacroPad RP2040 no buzzer sound
That did it! Should probably be added to the test code, so other's don't get tripped up like I did :)
Please be positive and constructive with your questions and comments.