pdf-icon

Arduino Quick Start

2. Devices & Examples

6. Applications

Unit C6L Buzzer

APIs and example programs related to the Unit C6L Buzzer.

Example Program

Compilation Requirements

  • M5Stack Board Manager version >= 3.2.3
  • Board option = M5UnitC6L
  • M5Unified library version >= 0.2.10
cpp
1 2 3 4 5 6 7 8 9 10 11 12
#include "M5Unified.h" void setup() { M5.begin(); } void loop() { M5.Speaker.tone(7000, 100); // frequency, duration delay(1000); M5.Speaker.tone(4000, 20); // frequency, duration delay(1000); }

API

The driver for the Unit C6L Buzzer uses the Speaker_Class from the M5Unified library. For more related APIs, please refer to the following documentation:

On This Page