Monthly Archives: February 2012

.NET Gadgeteer beginner’s guide

This article is for people who have never used .NET Micro Framework and Visual Studio or building things with .NET Gadgeteer before like me. I documented each step after receiving my kit and everything I did to start a project and have a simple program set up and running (the whole process took about 1.5 hours with the help of Simon Olberding).


Before we start, a quick overview about what this is about- .NET Gadgeteer is a new open source platform based on the use of the .NET Micro Framework. What this really means for me is that I can write higher level code (C#) for a complex electronics project with the .NET framework which supports a real-time debugging environment. I build my own circuit board and chose my favorite microprocessors most of the time in order to adopt the circuit for specific applications. However, Gadgeteer comes with modular peripherals which allow you to plug in and not to worry about the physical connection, power, and modularity in the early stage of your development. It also comes with a powerful ARM processor (on EMX module which contains ARM Processor, Flash, RAM, Ethernet PHY…etc),   which reminds me of the Begalboard which is a hardware platform based on TI ARM-A8 processors.

.NET Gadgeteer provides a nice hardware interfacing platform for electronics hobbyist to build projects that requires more computing power with very little knowledge requirement on the hardware end. The development environment allows you to drag and drop components in a graphic user interface manner and automatically includes the libraries for you.

My step by step tutorial is for people who just received their starter kit and can not wait to plug everything in and make something blink. I found it hard to find a tutorial simply lists all the things one needs to know.

Now, I would like to talk about our experience in setting up a FEZ Spider Starter Kit. .

Setup – software
Things to install – You can find everything from this link –

System preparation
1.  Microsoft Visual C# Express 2010
2.  Microsoft .NET Micro Framework 4.1 SDK
3.  GHI NETMF v4.1 and .NET Gadgeteer Package Feb. 24, 2012

This installs all the necessary SDKs and components.
First Project Settings

Beginners Guide to C# and the.NET Micro Framework

Setup- Hardware

The mainboard (in our case, a FEZ spider 1.0 mainboard) comes with 14 sockets marked with letters.

The first application we tried to setup is as follows

  1. A button that can trigger an event — input device
  2. Being able to draw something on the touchscreen — output device
  3. Reading signals from Pulse Oximeter and temperature/humidity sensors — events

Sockets mapping – First, what you need is the socket mapping diagram -

 The pulse oximeter transmits signals through UART (indicated by the “U” on the sensor board), the button and temperature/ humidity sensor use GPIO pins (indicated by X: 3 GPIO and Y: 5 GPIO) . The LCD is connected with “R”, “G”, “B” and “T” (touchscreen).

The wiring is as the following image.

You also need the power board which connects to “D” – USB device. It’s pretty straightforward once you figure out the letter matching scheme.

Before you continue, make sure when you plug in, you finished the “First Project Settings “ and had successfully pinged the device and set up the project.


Now, we are ready for some action.

First, start visual C#,

File → New Project… select Gadgeteer and then select “.NET Gadgeteer  Application -> ok

Then you should first see the Program.gadgeteer page.

Click the Toolbox on the left side and select your mainboards, GHI Electronics and Seeed sensors. Link things together based on the Letter matching scheme. Once you are done, you will notice that a Program.generated.cs file was generated and all the modules are included and initiated in this file and you are good to go!

Now, switch to Program.cs and start programming your first .NET Gadgeteer project!

The best examples that I found, besides from the example projects,are from the msdn blog written by Kerry Hammil. The example projects can be found under ../Microsoft .NET Micro Framework 4.1/Samples/


How to read a resistor’s value…

Okay, I know it’s really basic and you probably have an app on your iPhone for it.

But I still cannot help to share the great discovery I made last week.
Before that, let’s cover the bases. There are color bands on a through hole resistor and the numbers are arranged in the same way as the color of the rainbows (sort of).

Black Brown Red Orange Yellow Green Blue Violet Grey White …

I always thought those numbers were randomly assigned just because rainbows are pretty until last week.

Long story short, Nan and I blew up a light dimmer while trying to reverse engineer the circuit. After the magic smoke, we tried to figure out exactly which resistor was blown by reading the value of the apparently troubled resistor…

First, we measured it just for fun… and of course, “beeeeep”, said the multimeter (which means it’s a short circuit, zero ohm in multimeter language).

Then, naturally, I tried to read the value to show off the fact that I remember the color of the rainbows.

“Okay, it is black-black-black-black….”