Introducing the Dot Net Gadgeteer platform - Specialmoves
Introducing the .Net
Gadgeteer platform
Specialmoves Labs
I’ve spent a bit of time in the last few weeks playing
around with Microsoft’s .Net Gadgeteer platform. Gadgeteer is Microsoft’s open
source answer to arduino.
Microsoft .NET Gadgeteer is an
open-source toolkit for building small electronic devices using the .NET Micro
Framework and Visual Studio/Visual C# Express.
Being a .Net developer I was really excited when I found out about this, I could do some cool arduino style projects, but using my favourite programming language C#.
I immediately set out to persuade Alex, our MD, to buy the team a Gadgeteer dev board to do some R&D with.
Hardware
After having a look at a few of the different boards available, we decided to get the Fez Spider starter kit to play around with.
The kit includes the spider mainboard and a nice selection of modules, including an Ethernet module, camera, usb host module, and even a 3.5” touchscreen.
The board itself has a 72MHz 32-bit ARM7 processor, 4.5 Mb Flash and 16 Mb Ram. There are lots of other Gadgeteer modules available: light sensors, accelerometers, WiFi modules etc. Modules plug straight into sockets on the mainboard.
You can also use the Extender module to wire up specific pins of a socket to a breadboard. The possibilities are endless.
Getting Started
Once you have the hardware it’s time to install some tools.
Visual Studio is the development environment for Gadgeteer. You can grab visual C# 2010 express for free if you don’t have the full version of Visual Studio.
You will also need .NET Micro Framework 4.1 SDK and the supporting software for the Spider mainboard and modules.
There is a also a very nice article on getting started with the spider on the GHI Electronics website.
Hello World
One of the first things I did with the spider was to set up a web server using the ethernet module. This can be achieved in just a few lines of code as demonstrated below.
void ProgramStarted()
{
ethernet.UseDHCP();
ethernet.NetworkUp +=
new NetworkModule.NetworkEventHandler(NetworkUp);
}
void NetworkUp(
GTM.Module.NetworkModule sender,
GTM.Module.NetworkModule.NetworkState state)
{
Debug.Print(
ethernet.NetworkSettings.IPAddress.ToString());
WebServer.StartLocalServer(
ethernet.NetworkSettings.IPAddress, 80);
var helloWorld =
WebServer.SetupWebEvent("hello-world");
helloWorld.WebEventReceived +=
new WebEvent.ReceivedWebEventHandler(HelloWorld);
}
void HelloWorld(
string path,
WebServer.HttpMethod method,
Responder responder)
{
responder.Respond("Hello world");
}
Have Fun!
I had lots of fun experimenting with the Gadgeteer platform. It’s a very familiar development environment for me and I think any .Net developer should be able to jump in and get coding straight away.
The plug and play nature of the platform means that you don’t really need to have any experience with the electronics side of things.
I'll be doing a follow up post soon on my first real project with Gadgeteer.
---
Rik is Head of DotNet at Specialmoves where he spends most of his time with wires and soldering irons pretending he’s Macgyver. @RikTheManc
Follow us on Twitter @specialmoves