pdf-icon

Arduino Quick Start

Cardputer Buzzer

M5Cardputer Buzzer Buzzer related APIs and case programs.

Example

cpp
1 2 3 4 5 6 7 8 9 10 11 12 13
#include "M5Cardputer.h"
void setup() {
auto cfg = M5.config();
M5Cardputer.begin(cfg);
}
void loop() {
M5Cardputer.Speaker.tone(10000, 100);
delay(1000);
M5Cardputer.Speaker.tone(4000, 20);
delay(1000);
}

API

M5Cardputer library is based on the M5Unified library, Buzzer part of the driver uses the Speaker_Class in the M5Unified library, more related APIs can refer to the following document:

On This Page