Tuesday, December 13, 2011

.NET Gadgeteer - First Impressions

It shows just how far Arduino and the other open source hardware platforms have come, when Microsoft wants to get in on the act.

The question often posed is 'is .NET Gadgeteer an Arduino Killer?'



The answer is an emphatic NO, it isn't. In the same way that a Rolls-Royce isn't a pedal cycle killer. They are both vehicles and some people will own one of each, but they are very different beasts.

It is rare that you get very far with an Arduino without a bit of soldering. It has a laughably feeble processor, tiny amounts of RAM and program storage. However, thats often all you need. Its 'lightness' is part of its charm.

The .NET Gadgeteer is a quite different beast. The kit I have is the 'Fez Spider Starter Kit' from GHI electronics. And it comes with a fantastic range of things to connect to your Controller board.

Yup, thats right, there is a camera, a large LCD touch screen, a joystick, multicolor LED, USB host, SD card and even a little push button. And they all have little DIL connectors, so you assemble your project by plugging things together. Nearly all the components actually have their own microcontroller, and I suspect there are more transistors in one of these kits than a thousand Arduinos.

So whereas an Arduino project will often involve a shield, that has a few components on, say a screen and a joystick,  in the Gadgeteer world, you plug in separate components using lengths of ribbon cable. So the front of a Gadgeteer controller board is covered in sockets into which things can be plugged.

There are rules about what can be plugged into what, but we will come to that in a moment.

You can see the separate programmer, which yes, you guessed it uses one of those little sockets to connect it to your computer via USB. When I say your computer, obviously I mean your Windows computer. You program the Gadgeteer using the Visual Studio integrated development environment, and this is only available for Windows. However, Mac and Linux users do not despair. I had no problems running the development environment on Virtual Box and Windows on my Mac.

I have to say that programming the Gadgeteer was a very pleasant surprise. The libraries are very well though out and easy to use and backed up by a really excellent hardware designer. Let me show you.

In this mini project I am connecting a joystick and a RGB LED. So, as I change the position of the joystick, it will use the X position of the joystick to control the brightness of the blue channel of the LED.

So, before I actually plug together the physical hardware, I plug together virtual hardware on the designer. This does nice things like tell me which of the sockets are compatible with the peripheral I am plugging in.

Then, when I am done designing the hardware, I hit save, and a load of boilerplate code is generated for me. All I need to do then is add in a Timer and a single line that reads the X position, scales it and assigns it to the blue channel of the LED and I am done.

Installing it in the actual hardware is a button press and what's more I can use a proper debugger and set break-points in my code and everything.

Very cool.


I can see .NET Gadgeteer working really well in educational settings. Its a great way of getting kids to understand that their gadgets don't just fall ready formed from the sky, but they get designed by people like them. The ability to make things without soldering is sadly another win in our safety conscious society.

It is a very well thought out and consistent system that provides another approach to hardware development for the masses.

About the Author
These are my books. Click on the image below to find out more about them.


rasmus og elsebeth said...

Did you do anything special do make virtualbox forward the usbport to window. On my setup (host: osx lion, guest: windows7-64bit) the fez spider doesn't show up in visual studio. :(

Simon Monk said...

Yes, yopu have to go to Ports then USB and then add it. Details in the book ;)

Tee said...

Dear sir
Base on this kit, can I build some hardware module to connect main-board by myself?. For instance I may use the LCD 2x16 to connect it.

Tee said...

Dear Sir
I have a question about the FEZ spider kit. Can I connect its with the general electronic module, i.e,2x16 LCD, push button, LDR sensor... .

geek4439 said...

using c# vs. arduino c seems far superior. compile times faster, data structures richer & more complex, intellisense showing data & methods appropriate to a component a real plus. windows form permits better computer interface to drive connected modules (i.e. rgb sliders to control rgb led module). Learn best practices software as well as hardware components on c#, not on arduino c. soldering practice can be a separate activity to be driven by gadgeteer modules, imo. also, complex programs, like astronomical calcs to determine civil sunrise, sunset for home automation can be stand alone on gadgeteer, requires host computer for arduino.
as you say, each has its place. For me, software capabilities of .net & c# IDE too good to pass up. But then I'm more software than hardware. Got into this to manipulate physical world rather than just pixels. Your books very helpful.