Main Site Documentation

Port of FEZ Panda II code to Gadgeteer Cerbuino Bee


#1

Would like feedback from the more experienced on porting some 2 year old FEZ code I wrote for Cobra and Panda to Gadgeteer.

I have a Cerbuino Bee with the old I socket shield attached that has 20 of the old style 3 pin sockets for the FEZ 3 pin modules.

  1. Created a gadgeteer project in VS 2012 for Cerbuino Bee
  2. Added the Pin Enumeration Helper Class - https://www.ghielectronics.com/docs/45/fez-cerbuino-bee-developer
  3. Added reference to GHI.Hardware.FEZCerb
  4. Added the FEZ LED driver class as a simple test
  5. In the LED driver class, I changed FEZ_Pin to Cpu.Pin and added a using statement for Microsoft.Spot.Hardware so that it can find the Cpu.Pin class (could have created a new FEZ_pin class…).
  6. In the Program.cs class, I added a using statement to GHIElectronics.NETMF.FEZ which is the namespace for the FEZ LED driver class (could create a new namespace…)
  7. Copied over the FEZ code for blinking the LED
  8. Changed the
    redLight = new FEZ_Components.LED(FEZ_Pin.Digital.Di1);
    to
    redLight = new FEZ_Components.LED(GHI.Hardware.FEZCerb.Pin.PB10);

Built and deployed.

Light blinked.

What am I missing? Any suggestions that will help me port more complex device drivers?

Thanks,

Michael


#2

Can you show the rest of the code, please?


#3

I think the question is… this upgrade task from 4.1 to 4.2 didn’t seem very hard, am I always in to this simple a task, or have I missed something that will bite me later? So I am not sure giving the rest of the code is what is needed :slight_smile:


#4

I thought there was a problem (it blinked only once)


#5

There wasn’t any problem. I wrote the code to only blink the light once. But since then I read over the article on Output and InputPorts and realized I don’t really need the old FEZ LED and Button drivers, since you can simply set them up as an OutputPort and an InputPort and you’re done…