
Arduino Quick Start
APIs and example programs related to the Dial Buzzer.
#include "M5Dial.h"
void setup() {
auto cfg = M5.config();
M5Dial.begin(cfg, false, false); // encoder, RFID
}
void loop() {
M5Dial.Speaker.tone(10000, 100); // frequency, duration
delay(1000);
M5Dial.Speaker.tone(4000, 20); // frequency, duration
delay(1000);
}The M5Dial library is built on top of the M5Unified library. The buzzer driver uses the Speaker_Class provided by M5Unified. For more related APIs, please refer to the following document: