Class Buzzer
Simple buzzer.
[Interface("Simple buzzer")]
public class Buzzer
- Inheritance
-
Buzzer
Constructors
Buzzer(PwmChannel)
Initializes a new instance of the Buzzer class.
public Buzzer(PwmChannel pwmChannel)
Parameters
pwmChannel
PwmChannelThe PWM controller to use during work.
Buzzer(int)
Initializes a new instance of the Buzzer class.
public Buzzer(int pinNumber)
Parameters
pinNumber
intPin connected to buzzer.
Buzzer(int, int)
Initializes a new instance of the Buzzer class.
public Buzzer(int chip, int channel)
Parameters
chip
intThe GPIO pin number in case of a software PWM. The chip in case of a hardware PWM.
channel
intThe channel to use in case of a hardware PWM.
Methods
Dispose()
Dispose Buzzer.
public void Dispose()
PlayTone(double, int)
Play tone of specific frequency for specified duration.
[Command]
public void PlayTone(double frequency, int duration)
Parameters
StartPlaying(double)
Set new or overwrite previously set frequency and start playing the sound.
[Command]
public void StartPlaying(double frequency)
Parameters
frequency
doubleTone frequency in Hertz.
StopPlaying()
Stop playing tone.
[Command]
public void StopPlaying()