Closed patfelst closed 4 months ago
Hello, @patfelst The buzzer built into the StickCPlus is very small, so it doesn't make a loud sound
It may be easier to see how it works by playing it repeatedly in a loop. Try the following code:
#include <M5Unified.h>
void setup() {
M5.begin();
M5.Speaker.setVolume(255);
}
void loop()
{
for (int i = 1000; i < 8000; ++i) {
M5.Speaker.tone(i, 100,0);
M5.Display.drawNumber(i, 0, 0);
}
}
Yes that solved the problem, thank you so much. It is very quiet like you say. Have a nice day @lovyan03.
Hi there, on M5StickC Plus, how do I use the built in buzzer? It is connected to GPIO2.
I tried using the speaker code example however no sound was made. This is the code I tried:
Thank you for any suggestions.