Skip to content

Buzzer¤

Example usage¤

  • 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();
        }
    }

}
  • bool isOn() :
  • void on() :
  • void off() :
#include "Logic.hpp"
#include <iostream>

void logicMain() {
    while (true) {
        if(buttons.read(Enter)) {
            buzzer.on();
        } else
        {
            buzzer.off();
        }
    }

}