Table of Contents

Sound generator

The sound generator library is intended for controlling the beeper on the HomeLab user interface module.

In the HomeLab II generation module, the sound source is a buzzer (piezo element), which produces sound when driven with pulses of a certain frequency using the timer PWM generator. In the HomeLab III generation module, a speaker is used to generate sound and it is driven with a clock signal using the DAC module and timer; thanks to the DAC module it is possible to adjust the speaker volume. Without the library, the DAC can also be used to play audio files and speech through the speaker.

Functions

Example

#include <homelab/module/buzzer.h>
 
int main (void)
{
	buzzer_sound(50,500);
}