Examples

Basic Usage

    using System;
    using System.Threading;
    using Microsoft.SPOT;
    using Microsoft.SPOT.Hardware;
    using SecretLabs.NETMF.Hardware;
    using SecretLabs.NETMF.Hardware.Netduino;
    using SmudgeIT.Tlc5940;

    public class Program
    {
        private static Tlc5940 chip;

        public static void Main()
        {
            chip = new Tlc5940(
                                  Pins.GPIO_PIN_D13,
                                  Pins.GPIO_PIN_D11,
                                  Pins.GPIO_PIN_D10,
                                  Pins.GPIO_PIN_D9,
                                  Pins.GPIO_PIN_D8,
                                  Pins.GPIO_PIN_D12
                                  );
            chip.DotCorrectionValues = new int[] { 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10 };
            chip.Init();
            int active = 1;
            while (true)
            {
                chip.Update();
                chip.SetAll(0);
                chip.Set(active, 100);
                chip.Update();
                active++;
                if (active == 17)
                { active = 1; }
           }
        }
    }

Last edited Dec 8, 2010 at 1:36 AM by SmudgeIT, version 3

Comments

JacopoMTK Jan 22, 2013 at 5:11 PM 
Will this library work when using the sparkfun's board used in this article? http://bildr.org/2012/03/servos-tlc5940-arduino/
Thanks in advance!