MatrixMiniR4 1.1.4
Matrix Mini R4 Arduino Library API Documentation
Loading...
Searching...
No Matches
MiniR4BUZZER Class Reference

A class for controlling a buzzer. More...

#include <MiniR4Buzzer.h>

Public Member Functions

 MiniR4BUZZER ()
 
void begin (uint8_t pin)
 Initializes the buzzer by setting the pin number. (Built Buzzer at Uno Pin 6)
 
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.
 

Detailed Description

A class for controlling a buzzer.

This class provides methods to generate tones and stop tones using a specified pin on the Arduino.

Definition at line 17 of file MiniR4Buzzer.h.

Constructor & Destructor Documentation

◆ MiniR4BUZZER()

MiniR4BUZZER::MiniR4BUZZER ( )
inline

Definition at line 20 of file MiniR4Buzzer.h.

Member Function Documentation

◆ begin()

void MiniR4BUZZER::begin ( uint8_t pin)
inline

Initializes the buzzer by setting the pin number. (Built Buzzer at Uno Pin 6)

Parameters
pinThe pin number connected to the buzzer.

Definition at line 27 of file MiniR4Buzzer.h.

◆ NoTone()

void MiniR4BUZZER::NoTone ( void )
inline

Stops the tone on the buzzer.

Definition at line 40 of file MiniR4Buzzer.h.

◆ Tone()

void MiniR4BUZZER::Tone ( uint16_t frequency,
uint32_t duration )
inline

Generates a tone at the specified frequency for a given duration.

Parameters
frequencyThe frequency of the tone in hertz.
durationThe duration of the tone in milliseconds.

Definition at line 35 of file MiniR4Buzzer.h.


The documentation for this class was generated from the following file: