Main Site Documentation

Cerbuino throws error at first change


#1

Hi All,

just got my first gadgeteer (Cerbuino) flashed it to the latest firmware (2x) comfirmed the 4.2.3.3 via mfdeploy wanted to start my first test by setting on/off the on board led in a timer event. but experience a nice error, what am I doing wrong …


#2

Gadgeteer 4.2


#3

You are not trying to run it in the Emulator by any chance?


#4

Nope, to device directly


#5

Do you know if you have QFE2 on your system?


#6

Yep I’m pretty sure …


#7

Remove all references and only add the ones that are needed.


#8

Well, I have started a brand new project and made no change just hit F5 and no probs … didn’t do much but didn’t fail either … could be I’m directly trying to access the on board led

… somewhere in main program …


public static OutputPort led = new OutputPort(Pins.LED, false);

where Pins.LED is in some class found as:


public const Cpu.Pin LED = (Cpu.Pin)0x12; // PB2/BOOT1


#9

Please show exactly where in main you do that?

If you do that before the Mainboard is created then that may be the reason.

Anyways you should access onboard led using Mainboard’s SetDebugLED method.

In non-Gadgeteer project you can use OutputPort.


#10

See screenshot for details…


#11

Yes remove that OuputPort declaration and it will work.

Don’t use OutputPort for onboard led in Gadgeteer project. Use MainBoard method I have mentioned in my previous post.


#12

Ooohhhh man, what was I thinking of … hoped my coding experiences on Panda-II and Cobra 1 is 1:1 usable … well I’ve got some reading to do …

Thx 4 ur help in this … it works now … the blinking led … up to the rest …

It’s midnight over here so I’m hitting my pillow … wish you the best …

Cheers,

Peter


#13

You are welcome!

There is nothing wrong about using OutputPort for a led and your experience is good.

It just the onboard led is already “taken” by another OutputPort inside Mainboard class in Gadgeteer.