Buzzer Class

Definition

Buzzeer class to support buzzers, note this class is using PWM to control the buzzer

public class Buzzer : Iot.Device.GoPiGo3.Sensors.ISensor
type Buzzer = class
    interface ISensor
Public Class Buzzer
Implements ISensor
Inheritance
Buzzer
Derived
Implements

Constructors

Buzzer(GoPiGo, GrovePort)

Constructor for the Buzzer class

Buzzer(GoPiGo, GrovePort, Byte)

Creates an instance of the Buzzer class

Properties

Duty

Get/set the PWM duty to use to generate the sound from 0 to 100

Port

Grove port

SensorName

Get the sensor name "Buzzer"

SupportedPorts

List the supported Grove ports for the sensor

Value

Get/set the frequency in Hz

Methods

Start()

Starts the buzzer

Stop()

Stop the buzzer

ToString()

Get the frequency in Hertz

Applies to