Buzzer
Example usage
"Logic v2.*"
bool isOn()
:
void on()
:
void off()
:
void setFrequency(std::uint32_t frequency)
:
- This function sets the frequency of the buzzer. The frequency is in Hz.
#include "Logic.hpp"
#include <iostream>
void logicMain() {
while (true) {
if(buttons.read(Enter)) {
buzzer.on();
} else
{
buzzer.off();
}
}
}
"Logic v1.*"
bool isOn()
:
void on()
:
void off()
:
#include "Logic.hpp"
#include <iostream>
void logicMain() {
while (true) {
if(buttons.read(Enter)) {
buzzer.on();
} else
{
buzzer.off();
}
}
}