Newby question

Hi,

I’m new to FEZ Domino and I really like it a lot.
Small question, how can I read back the status of a digital pin? For example if I want to test in my code if the FEZ_Pin.Digital.LED pin is high or lo? Im sure it’s written down somewhere in the bulk of documentation, but…

Regards,
Johan

Take a look at Microsoft.SPOT.Hardware.InputPort or Microsoft.SPOT.Hardware.Port.

Discalimer - I’m a newbie too and have not played with either of these but did play a bit with Microsoft.SPOT.Hardware.OutputPort last night.

Greg

Do you want to read an input pin or read back the output pin to make sure it is high?

Like Greg said, InputPort is what you need to search for in the ebook. It is detailed there, better than me giving a short answer.

Disclaimer #2: (love Greg “disclaimer”) FEZ is only few weeks old and everyone here is new, including me :(. Please feel free to ask any questions you have but always keep the free ebook handy.

Hey that was a “Discalimer” not a “Disclaimer” :wink: Either I need to learn how to type or I am adding to the language :wink:

I am thinking of the “Microsoft.SPOT” stuff as the “main library” and the “GHIElectronics.NETMF” as valuable add-ons to the overall library (excuse my terms, just learning C# myself).

One point of confusion that I have is where items are seemingly duplicated in the MS MF and in the GHIElectronics framework (pin definitions for instance). If I am finding a “duplication” like this I think the best bet is to default to the GHIElectronics framework as that is more specialized for the hardware…

Greg

There are very little duplicates and if so, they are there to make life easier. For example the default GPIO enums are only 32 (if I remember right) but then we may have more or less. Also, where would GPIO5 (for example) map on FEZ? For these reasons, we have our own pin enums (definitions)

Hi Guys,
Thanks for the hint. Seems that I am more newby than you guys :wink: I was looking at the wrong place.

Found it. I can use the Write and Read methods of the outport class.