Starting with G120HDR

I bought a G120HDR board to start developing in .NET MF.

I’m a little confuse about this module.

I can’t understand if the pin header sockets are compatible with the boards available in the website.
I bought several boards like LOAD board, GPS Board, LCD 3.5" Board, OLED Board, SD card…
But the G120HDR has 3 sockets for display only and 2 other labeled USER 1 and USER 2.

What boards can I connect on those headers ?

Other questions:

I started with the beginners guide to .NET MF.

The only problem is that I can’t find some classes like described in the guide.
For example I couldn’t find the OutputPort class used in a LED blink example.

Where it is supposed to be ?
And what is the difference between the common and the PREMIUM hardware ?

What namespaces I need to use for the G120 module ?

Thanks in advance.

Hi GiovaniLuigi,

G120HDR has the display sockets on it (R,G,B) so you can connect the display sockets of the T35/T35e display. The other two sockets are unwired, so you have flexibility in wiring them up how you like, to suit the devices you want to use. The G120HDR for that reason isn’t one of the “general purpose” boards; you may have to rewire things if you decide you want to connect a different set of modules. But the good thing is that with a handful of breakout modules you can then connect the module to that breakout, then wire up the .1" header on the breakout to the .1" connections on the G120HDR.

Begineers guide to netmf is somewhat dated, and not Gadgeteer specific, but things like the OutPutPort class should not be an issue - you need to check what references you have added. And speaking of that, you want to use the G120 specific reference, GHI.Premium.Hardware.G120.

For the difference between “Premium” and “OSHW” devices, you can check out that shows this.

1 Like

Thanks Brett.

By wiring by myself you mean that I need to solder them with jumpers wires to the pins available ? Seems weird… well anyway it should work.

I’ve added the reference to the GHI.Premium.Hardware.G120 but there is no class called OutPutPort inside of it.

Beginners Guide really seems to be out of date, but isn’t there any other reference ?

In the website I could check some other code examples but I still not able to find some classes.

GHI.Premium.Hardware.G120 is everything needed to have basic access to the hardware ?
Could you post, or let me know where to get, a simple LED blink example that works for G120 ?

I guess I’ll buy a FEZ Cobra to solve wiring problems and also to have a design reference.

The guide is up to date. What you added has the pin definitions, not the OutputPort class. We are talking about the ebook getting started guide?

Before you dig deep, the best thing to do is go through the book to set IOs and read analog pins. From there you can use any samples.

FEZ Cobra still requires wiring. IF you are not comfortable with wires or you do not have a background in electronics you need to use gadgeteer where everything is plug and play, no soldering needed at all.

The guide is up to date for FEZ domino maybe…
I can’t find any reference to the new modules…
Maybe the modules are out of the scope of the guide… but then where can I find the guide of each module ?
I guess that there is no guide for each module…

We’re talking about the eBook available in Downloads section of any module.

The inconvenience of wiring is not because I can’t do, but is because my time is very short to spend wit these modules and I’m planning to use it into a commercial application,
so less wires, more time to dedicate to the software that will need time…


I have gone through the book but I repeat that I can’t find the classes according to the guide.
Maybe I’m missing something but If I cut and paste in Visual Studio (assuming that I have referenced all the available namespaces) it doesn’t work.

I can’t use any sample for G120. Here is one example:

using System;
using Microsoft.SPOT;
using System.Threading;
using Microsoft.SPOT.Hardware;
using GHI.Premium.Hardware.EMX;
namespace MFConsoleApplication1
    public class Program
        public static void Main()
            OutputPort LED;
            LED = new OutputPort((Cpu.Pin)EMX.Pin.IO47, true);
            while (true)

from GHI Electronics – Where Hardware Meets Software

The code above changing the line

using GHI.Premium.Hardware.EMX


using GHI.Premium.Hardware.G120

and doing some other minor changes to fit G120…

Doesn’t work for me.
I don’t have a clue why but the class OutputPort doesn’t exists inside any of the mentioned references.

Somebody tell me: In what assembly should I find the OutputPort class ?

The modules are gadgeteer but your board is not. Check the catalog to see how things are grouped. The g120hdr catalog page also mentions that this board is not a gadgeteer mainboard.

Still, you can use the module with somewhat easy work but you must first understand both netmf and gadgeteer a bit more.

By the way, we are adding something to make this easier in the near future.

Hmm, well adding more documentation will be good.

but your answer doesn’t explain why can’t I use the sample code.

In the page of the example we have this:

Anyway I’m not using any feature from gadgeteer.
I know that the boards are for that but I’m not thinking on them now.
I’m using a protoboard to connect the pins from G120HDR to some hardware.

I just need to know how to command the G120 ports, read/write serial ports and things like that.
And I can’t find a guide for this.
That is the real problem.

Sorry about telling what I’m going to tell, and maybe I need to understand some things better because I maybe missing something about all those modules…

But this topic, this situation is exactly the problem.

It is not the hardware and it is not the software… but it is the documentation… or the lack of it.

Maybe my lack of knowledge about .NET MF is the real problem, but the cause of this lack, is the problem then.

I’m asking simple things like: Where is the class OutputPort… and no one can answer…
That shows the problem that I’m having to start working with this hardware.

This is a constructive critic… I’m happy to have your support but you can’t deny that all this is a big mess right now.
I guess the hardware and software are very powerful, but without the understanding about them, they’re useless.

Your code above is correct. Your frustration is because you have gadgeteer modules you are trying to use on a non gadgeteer mainboard. This is for advanced user

So, modules a side, you should be able to control pins in few minutes.

Let me ask if you followed these steps from the book and all passed okay

  1. You made console app and loaded in simulator
  2. You modified the text to print something in debug window
  3. You loaded the same app on your g120
  4. You modified the code to use output port and added the hardware DLL reference

Were you successful at all above?

ok, here we go:




I modified the code but I stopped when I couldn’t find the OutputPort class.

And here I’m

I’m following these logical steps to get started in a new hardware:

1 - Stabilish the with hardware link;
2 - Test the hardware basics;
3 - Check how to control ports;
4 - Ready to the fun!

I’m stucked in step 3… I can’t control a port.

Essentially I’m looking for a better explanation about how to use the pin/port class.

How to control the type (Tristate)
How to define the direction (Input/Output)
How to configure special features (Pullup)
How to set/read it.

Those are the basic things that I’m trying to do, and it seems that I need a class to do this.

Then OutputPort would be my best clue to blink a LED

Did you add this DLL to your references? I think it is explained in the book

I just checked the ebook and it specifically say add this DLL and the previous couple pages talk about references and how to add them.

Working now?

Yes I did.

I have added all these references:

using System;
using Microsoft.SPOT;
using Microsoft.SPOT.Hardware;
using GHI.Premium.Hardware.G120;

Let’s try another approach.

Could you give me an example of how you would do a code to blink a LED ?

Would you going to use this same class (OutputPort) ?
Can I use other class ?

What kind of error are you seeing?

And show your code exact please.

Visual Studio says that class OutputPort was not found. It is asking me if I’m missing some reference…

The lines above tell the code you want the namespace. You still need to add them.

Please post an image snapshot of your references.

Again, this is explained in the book, the 2 pages just before using output port.

Section called “assemblies” on page 18, just before output port section.

Hmm, that maybe the problem.
I may forgot to add the reference to the SPOT.Hardware.
Hmm… I guess you’re right.

I just don’t have the code here with me.
It is on my Lab.
I’m in home and is 02:25 AM for me so I’ll answer this tomorrow.

But I guess we have reached to the problem…
My bad!

Anyway that was a clarifying topic.

Please keep following it and I’ll let you know if that was my problem.

Good we have a solution, just go through the book slowly. It is only few pages :slight_smile: