I am trying to get the fading LED sample from the beginners manual to work on a Panda.
Here is the code, copied from the intro guide:
using System;
using System.Threading;
using Microsoft.SPOT;
using Microsoft.SPOT.Hardware;
using GHIElectronics.NETMF.FEZ;
using GHIElectronics.NETMF.Hardware;
namespace FEZ_PandaPWMTester
{
public class Program
{
public static void Main()
{
sbyte dirr = 1;
byte duty = 40;
PWM pwm = new PWM((PWM.Pin)FEZ_Pin.PWM.LED);
while (true)
{
pwm.Set(10000, duty);
duty = (byte)(duty + dirr);
if (duty > 90 || duty < 10)
{
dirr *= -1;
}
Thread.Sleep(10);
}
}
}
}
On this line:
PWM pwm = new PWM((PWM.Pin)FEZ_Pin.PWM.LED);
the choices do not include LED and so the code will not even compile. I tried all of the choices and none of them worked. The choice that appears to line up best with the Panda schematic is IO4, but this does not work.
In my references I have
FezPanda_GHIElectronics.NETMF.Fez.
If I change this to FezDomino_GHIElectronics.NETMF.Fez. then I get the LED choice for the pin so I can compile, but it still does not work.
There was a similar post back in the summer but I think my problem is different and I have the updated version of the beginners guide.
Any advice?