FEZ Cobra II Onboard LED

I’m just getting started with my first .NETMF project and to be honest I’m finding it a bit frustrating. Granted, it’s only been 24 hours and I probably should have kept things simpler than I did to begin with. I have been programming full .NET applications of all kinds for many years, but the embedded hardware world is very new to me. Anyway, I have put the more complex stuff like Wifi and synchronizing time with an NTP server (both of which worked intermittently) on the back burner so I can get the basics under control. Even that is proving to be frustrating because it seems that most of the code samples/demos I have come across don’t actually work or are missing information.

For example, the beginner’s guide states “All FEZ boards have a LED connected to a digital pin”. I have a FEZ Cobra 2 and it has an LED labeled “LED1” next to the full size host USB port so I’m assuming I can do something with that. The documentation goes on to give the following code example…

using System;
using Microsoft.SPOT;
using System.Threading;
using Microsoft.SPOT.Hardware;
using GHIElectronics.NETMF.FEZ;

namespace MFConsoleApplication1
   public class Program
      public static void Main()
         OutputPort LED;
         LED = new OutputPort((Cpu.Pin)FEZ_Pin.Digital.LED, true);

Unfortunately, the “GHIElectronics.NETMF.FEZ” namespace does not exist anymore or I’m too clueless to find it (quite possible). I have looked through various libraries, documentation, and code samples and I just can’t find any reference to the onboard LED or even which pin it is mapped to on my hardware. Am I missing something obvious? It really doesn’t get any easier than this example and yet so far I have failed to get even this basic functionality working.

You can use GHI.Hardware.G120 namespace and P1.15 pin from there.

Thank you! That works.

How would I have known this though? I looked into the G120 namespace, but I had no idea which pin to try. I couldn’t find that anywhere on the board or in any of the documentation I have found so far. For example…


I’m worried that I have somehow missed an important information resource, but maybe it’s just a matter of having hardware experience. Is there a way that I could have determined this myself?

I have just looked at the schematics of this board. It indicates that LED is connected to that Pin.

It sure does. Thanks again. I knew I had to be missing something. That resource will be very helpful. Somehow I missed that document entirely.