Buzzer Class
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
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
Feedback
https://aka.ms/ContentUserFeedback.
Coming soon: Throughout 2024 we will be phasing out GitHub Issues as the feedback mechanism for content and replacing it with a new feedback system. For more information see:Submit and view feedback for