Meadow.Foundation.mikroBUS.Sensors.Buttons.CButton
CButton | |
---|---|
Status | |
Source code | GitHub |
NuGet package |
Code Example
CButton ledButton;
public MeadowApp()
{
Console.WriteLine("Initializing ...");
ledButton = new CButton(Device.Pins.D03, Device.Pins.D04);
ledButton.StartPulse(TimeSpan.FromSeconds(2), 0.75f, 0);
ledButton.Clicked += (s, e) =>
{
Console.WriteLine("Button clicked");
ledButton.IsOn = !ledButton.IsOn;
};
}