Getting Started
Hello, World!
Create a new C# Meadow Application project, name it
HelloPulsy
.Plug the longer leg (anode) of a blue LED into pin
13
and the other leg intoGND
:Replace the template logic in
MeadowApp.cs
with the code below, then deploy and run:using Meadow;
using Meadow.Devices;
using Meadow.Foundation.Leds;
namespace HelloPulsy
{
// Change F7FeatherV2 to F7FeatherV1 for V1.x boards
public class MeadowApp : App<F7FeatherV2>
{
PwmLed pwmLed;
public override Task Initialize()
{
pwmLed = new PwmLed(Device.Pins.D13, TypicalForwardVoltage.Blue);
return base.Initialize();
}
public override Task Run()
{
// pulse the LED
pwmLed.StartPulse();
return base.Run();
}
}
}That's it, you're controlling a blue LED with a PWM signal, using Meadow.Foundation's
PwmLed
driver!