Hello, World!

  1. Configure your Meadow development environment.
  2. Create a new C# Meadow Application project, name it HelloPulsy.
  3. Plug the longer leg (anode) of a blue LED into pin 13 and the other leg into GND: Diagram of a Meadow with a blue LED legs connected between ground and pin D13.
  4. 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
{
    public class MeadowApp : App<F7Micro, MeadowApp>
    {
        public MeadowApp()
        {
            var pwmLed = new PwmLed(Device, Device.Pins.D13, TypicalForwardVoltage.Blue);

            // pulse the LED
            pwmLed.StartPulse();
        }
    }
}

That’s it, you’re controlling a blue LED with a PWM signal, using Meadow.Foundation’s PwmLed driver!

Video of a Meadow pulsing a blue LED via pulse-width modulation.

Next up, check out how to work with sensors; which comprise a huge portion of the Meadow.Foundation peripheral library.

Next - Working with Sensors

 


These docs are open source. If you find an issue, please file a bug, or send us a pull request. And if you want to contribute, we'd love that too!