MatrixMiniR4 1.1.5
Matrix Mini R4 Arduino Library API Documentation
Loading...
Searching...
No Matches
MiniR4Buzzer.h
Go to the documentation of this file.
1
6#ifndef MINIR4BUZZER_H
7#define MINIR4BUZZER_H
8
9#include "MMLower.h"
10
18{
19public:
21
27 void begin(uint8_t pin) { _pin = pin; }
28
35 void Tone(uint16_t frequency, uint32_t duration) { tone(_pin, frequency, duration); }
36
40 void NoTone(void) { noTone(_pin); }
41
42private:
43 uint8_t _pin;
44};
45
46#endif // MINIR4BUZZER_H
Handling the Lower MCU (STM32) communication.
A class for controlling a buzzer.
void Tone(uint16_t frequency, uint32_t duration)
Generates a tone at the specified frequency for a given duration.
void NoTone(void)
Stops the tone on the buzzer.
void begin(uint8_t pin)
Initializes the buzzer by setting the pin number. (Built Buzzer at Uno Pin 6)