I’m trying to get started with my EMX Dev board. I have it all installed and with latest firmware all loaded etc. I can run a couple of example code snippets ok. So far so good, but now I’ve hit the wall. I want to do stuff like blink the LED, play some notes on the Piezo etc to just do baisc tests to get confident with the system.
However I can’t seem to find the basic info of how to reference the various components. Let’s take the Piezo for example, I see it is IO10 or PZ1 as labelled on the EMX dev board, but for the life of me I don’t know how to from the reference to it in my code. I can see the various code examples, but they mostly refer to the Fez. Ok, so I think to myself I should just use that code and make the small changes to refer to the EMX Dev instead, but I don’t know how to do that. Intuitively I would expect to just look at the Fez code and replace the FEZ string with EMX, but that doesn’t work, it seems the reference is formed in a different manner, why not have a consistent way to code all the modules, just changing the device string?
I look at the GHI Electronics NETMF Library but I find it hard to understand - if only there was an example usage at the bottom of each page to show you how it is actually used. I guess this makes sense to an experienced .NET programmer, but for me it’s hard to understand without any example usage to understand.
Can anyone help with an example of how to reference the LEDs at IO48/IO49 and the Piezo at IO10.
In a Fez example fromthe forum the line is…
FEZ_Components.Piezo myPiezo = new FEZ_Components.Piezo(FEZ_Pin.PWM.Di5);
or from the Melodies Turorial it uses…
static PWM MyPWM = new PWM((PWM.Pin)FEZ_Pin.PWM.Di5
How do I do the same for the EMX Dev? If yuo have any other examples of referencng the ports and pins in EMX they would be very welcome indeed.
Thanks for your help.