I was exploring GHIElectronics.Gadgeteer.FEZCobra_II.dll assembly and found DebugLedPin constant. It seems that it is not used anywhere. Maybe it should be made public so that we could read it. At the moment I am looking for a way how to find out which pin is connected to on-board LED, so making this constant public would very well suit my needs . Of course that would need to be done for all MB to make sense.
You have missed my point. I know how to read schematics. My two arguments are:
[em]DebugLedPin[/em] is private variable and it is not used. I would either remove it or make it public. Obviously, I would go with the last option.
User/programmer could read DebugLedPin (if it was made public), so the same code could work on all GHI MBs, you wouldn’t need to read schematics for every new MB. That’s especially good when you make universal classes that should work on any MB without modifying them.
P.S. Can anyone respond to my issue that I have sent using [em]Contact Us[/em] form?
However, maybe I’m still being dense; but, the drivers for every GHI mainboard, use this code with changes to the pin name/number:
// change the below to the debug led pin on this mainboard
private const Cpu.Pin DebugLedPin = G120.Pin.P1_15;
private Microsoft.SPOT.Hardware.OutputPort debugled = new OutputPort(DebugLedPin, false);
/// Turns the debug LED on or off
/// <param name="on">True if the debug LED should be on</param>
public override void SetDebugLED(bool on)
I have forwarded my initial issue to Gus (via private message) yesterday.
I see, source code does not match to what I get from .NET Reflector. Sorry, I had to double check before asking, but I will do it from now on .
I was looking for an easy way to access SetDebugLED or DebugLedPin outside of Program class. I have a case where Program class → Base_GUI class → Sub_GUI class → Worker class. I want to toggle LED from Worker class.