Now it's time to add NeoPixel functionality into your own projects.

You should already have two files, NeoPixel.dll and NeoPixelNative.dll. You've either downloaded them or compiled them yourself.

In the project where you want to use NeoPixels, inside Visual Studio, you need to add references to these two DLL files.
You actually need all the files from the bin folder of NeoPixel (not just the DLLs). Alternatively, just include the entire NeoPixel and NeoPixelNative projects into your solution and include them that way so the files are automatically found.
And in the code, you might want to add the following line where you have all your "using"
using NeoPixel;
For example (this program will give you a nice colorful test pattern)
using System;
using System.Threading;
using Microsoft.SPOT;
using Microsoft.SPOT.Hardware;
using SecretLabs.NETMF.Hardware;
using SecretLabs.NETMF.Hardware.Netduino;

using NeoPixel;

namespace NeoPixelTester
    public class Program
        public static void Main()
            NeoPixelChain chain = new NeoPixelChain(Pins.GPIO_PIN_D0);

            for (int i = 0; i < 8; i++)
                int v = (i + 0) * (256 / 80) + 1;
                chain.Add(0x55, 0xAA, 0x5A);
                chain.Add(v, v, v);
                chain.Add(0, 0, v);
                chain.Add(0, v, 0);
                chain.Add(0, v, v);
                chain.Add(v, 0, 0);
                chain.Add(v, 0, v);
                chain.Add(v, v, 0);

            while (true)
                // do nothing
To enable advanced graphical features such as bitmaps and fonts, you also need to add reference to Microsoft.SPOT.Graphics

This guide was first published on Sep 12, 2013. It was last updated on Sep 12, 2013.

This page (Using the C# Class) was last updated on Sep 10, 2013.

Text editor powered by tinymce.