Toolbox.NETMF.Hardware.Fez.PWM

This class uses the IPWMPort interface.

Toolbox.NETMF.Hardware.Fez.PWM(Pin)
  • Pin The PWM output pin

Methods

See the interface IPWMPort for a full list of methods

Sample code in C#

IPWMPort Led1 = new Fez.PWM((PWM.Pin)FEZ_Pin.PWM.Di5);
Led1.StartPulse();

while (true)
{
    for (uint Brightness = 0; Brightness < 100; ++Brightness)
    {
        Led1.SetDutyCycle(Brightness);
        Thread.Sleep(100);
    }
    for (uint Brightness = 100; Brightness > 0; --Brightness)
    {
        Led1.SetDutyCycle(Brightness);
        Thread.Sleep(100);
    }
}

Last edited Jul 2, 2012 at 10:04 AM by Garrcomm, version 3