We no longer sell products directly from the GHI Electronics website, click here for more details. Please find a Distributor to complete your online order. If you have any questions regarding this notice please contact us at support@ghielectronics.com.


This document is obsolete.

Last modified August 8, 2014


Tutorials: First Gadgeteer Project


One of the great features of .NET Gadgeteer is the ability of chaining multiple modules to a single socket. Not only that, the socket used is an X or Y socket, which are simply digital IOs and are the most common socket types found on a .NET Gadgeteer mainboard. Thanks to microcontroler that resides on a daisylink module, the connected modules can be anything, from a simple smart piezo or RGB LED to a complex CNC controller or IMU.

What Is OpenDaisyLinkProject

Gadgeteer OpenDaisyLink project is an initiative by GHI Electronics to make designing new .NET Gadgeteer dasylink modules an easy task.

On the module side, the project includes:

On the mainboard side, the project includes:

Supported Microcontrollers

Currently the project support NXPs Cortex-M0 LPC11xx series. This chip was selected for multiple reasons:

Module Reflashing

One of the biggest features of this project is the simple way of updating the C/assembly drivers running inside the small micro hosted by the dasylink module. Simply, an in-field-update feature for the module. The end user is able to update the drivers without needing any special tools.

This is done through NXP's Cortex-M0 microcontrollers built in boot loader. These chips have a built in boot loader that sits in ROM (no additional cost) and runs off the serial port. GHI developed the code needed on the mainboard to reflash modules. Users will only need to plug the module to a U (serial) socket to run the update.

An NETMF application capable of installing firmware can be found at: http://www.ghielectronics.com/community/codeshare/entry/641.

The standard firmware can be downloaded from http://www.ghielectronics.com/downloads/src/DL40_firmware_sources.zip

Another loader example is http://www.ghielectronics.com/downloads/bin/serialCommdaisylink.zip it is a Gadgeteer application that uses a T35 touch display and a FEZ Spider where you plug the Daisylink module to be programmed into socket 11 (to access the daisylink serial programming pins). The bin file is specified as a resource.

Generic DaisyLink Drivers

At its core, daisylink modules have virtual registers that are shared between the mainboard and the daisylink module. When the mainboard wants to command the module to do something, it will simply write to one of the virtual registers. The values and the registers are up to the designer. The Generic DaisyLink drivers expose simple methods to write and read these virtual registers.

Lets say we have an RGB LED module and we selected to have the first 3 registers to represent the LED color, Red, Green and Blue. So now calling


will set register 0 to 255 which happened to represent the level of the color Red in this example.

DL40 Module

This module has a 40pin DIP package outline, making it easy to plug in 40DIP socket or a prototyping breadboard. The module includes 2 header and 50Mhz 32bit processor. Combined with the generic DaisyLink drivers found on mainboards, creating new DaisyLink modules is a simple plug and play.

Daisylink Enumeration

To make programming at the Gadgeteer level easy, when a Gadgeteer application starts up in enumerates the Daisylink modules and assigns them addresses (more info on this process can be found in the module builder guide: https://gadgeteer.codeplex.com/downloads/get/665907 as well as a blog entry: http://www.breakcontinue.com/2012/02/gadgeteer-daisylink-protocol.html ). For Example: 

Because of enumeration the automatically generated code for the Gadgeteer initialization will look similar to:

public partial class Program : Gadgeteer.Program {
        private Gadgeteer.Modules.GHIElectronics.GenericDaisylink genericDaisylink;
        private Gadgeteer.Modules.GHIElectronics.GenericDaisylink genericDaisylink1;
        private Gadgeteer.Modules.GHIElectronics.GenericDaisylink genericDaisylink2;
        public static void Main() {
            // Important to initialize the Mainboard first
            Program.Mainboard = new GHIElectronics.Gadgeteer.FEZHydra();
            Program p = new Program();
            // Starts Dispatcher
        private void InitializeModules() {
            this.genericDaisylink = new GTM.GHIElectronics.GenericDaisylink(14);
            this.genericDaisylink1 = new GTM.GHIElectronics.GenericDaisylink(this.genericDaisylink.DaisyLinkSocketNumber);
            this.genericDaisylink2 = new GTM.GHIElectronics.GenericDaisylink(this.genericDaisylink1.DaisyLinkSocketNumber);
Leave feedback about this document.
Let us know if the information presented here was accurate, helpful and if you have any suggestions.
Leave feedback about this document.
Let us know if the information presented here was accurate, helpful and if you have any suggestions.

* Indicates required fields.
This form is only for feedback not support.
Review our how to find information guide on locating helpful resources.