QuickStart: A .NET Gadgeteer project in 10 minutes

If you are familiar with C# then .Net Gadgeteer is probably the fastest way to build embedded electronics. Development is done inside Visual Studio, and you can use the free version. A good range of modules for input or output is available (or you can create your own).

You can pretty much find anything you need as a module.
Like a temperature module, barometric pressure, touchscreen, light sensor, gas sensor, accelerometer, microphone, LCD display, Wifi, bluetooth, rs232, SD card reader/writer, camera, distance sensor, moisture sensor, stepper motor controller, relay, etc.

In this post I’m using a mainboard and sensor from GHI Electronics (www.ghielectronics.com/catalog)

So. Here is 10 steps to get you started!

1)

You need a mainboard and a power supply.
For example these two:

MainboardPower

a Fez Spider Mainboard and a power supply USB Client DP Module.  It can be powered by USB or by an adapter (any with 2.1mm barrel jack and from 7  to 30 volts).

2)
I’ll also be using a Barometric Pressure sensor and a LCD Character Display.

LCDandBarometer

And everything is connected using these cables (one supplied with each module)

Cables

3)
Install .Net MF and packages for Gadgeteer

4)
Start Visual Studio and create a new Gadgeteer project.

Create Project

Create a .Net Gadgeteer Project

5)
Select your mainboard from the list

Select mainboard

Select mainboard from the list

6)
Visual studio creates a basic skeleton program for you. With a few tips on how to get started.
netgadgeteer_emptyproject

7)
And you are ready to go!
Add modules from the toolbox into the canvas.

Add modules to the canv

8)
When you are done, right click the canvas to select Connect modules automatically (you can do this manually if you want a specific configuration)

.Net Gadgeteer in Visual Studio

.Net Gadgeteer in Visual Studio

9)
Add some code. Intellsense aids you with available properties, events and methods that are available for each module.

For examples of how to use each module, select it from the list at:
www.ghielectronics.com/docs

Add some code

The codes here is so simple that I don’t include a download. It’s faster to write it yourself 🙂

10)
done!
This example just read the barometric pressure and temperature so that it can display it on the LCD panel.

netgadgeteer_LCDDisplay

It’s a very fast prototype platform and it’s fun 🙂
If you like more information then head on over to Microsoft .NET Micro Framework at http://www.netmf.com  or GHI Electronics at http://www.ghielectronics.comIt did seem like Microsoft had abandoned NetMF for a while. But it looks like they are slowly doing more work on it. Hopefully they will continue supporting it. But even if they won’t,  the framework is pretty good as it is. The only downside is that you’ll need to use Visual Studio 2012 (express or any other).  you will of course need to be careful if you create internet enabled devices since security patches is missing. Being embedded devices the attack surface is smaller than a regular computer, but still…

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s