G400HDR Developer Quick Start
The onboard LED on the G400HDR is located on Pin PD3. It is a user controllable GPIO.
The following is some code to get you started blinking your first LED on the G400HDR:
using System;
using System.Threading;
using Microsoft.SPOT;
using Microsoft.SPOT.Hardware;
using GHI.Hardware.G400;
namespace G400_Console_G400HDR_BlinkLED
{
public class Program
{
public static void Main()
{
OutputPort G400HDR_LED = new OutputPort(Pin.PD3, false);
while (true)
{
Thread.Sleep(250);
G400HDR_LED.Write(!G400HDR_LED.Read());
}
}
}
}
The above does not work if you are using dotnetwarrior.Gadgeteer.G400HDR.
The Pin.PD3 is reserved and you will receive an Exception.
In it’s place just use:
using System;
using Gadgeteer:
PulseDebugLED();