.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).

Background

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 – http://www.tinyclr.com/support

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    http://wiki.tinyclr.com/index.php?title=First_Project

Beginners Guide to C# and the.NET Micro Framework
http://www.ghielectronics.com/downloads/FEZ/Beginners%20guide%20to%20NETMF.pdf

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    http://wiki.tinyclr.com/index.php?title=First_Project “ 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/

 

Tags:

About

By | February 27th, 2012 | SHOW COMMENTS (6)

6 Responses

  1. Leonard Marks says

    great post

  2. Dong says

    Great job for the Post!

  3. pinky says

    Brilliant Read!

  4. Eleonara says

    do check this site often as it is very good and informative and will i look out for an answer!

  5. Cirlei says

    great post.

  6. Dora says

    this is really an awesome post. the story is cool. i accept it as a story.

POST A COMMENT