This project is read-only.

Toolbox.NETMF.Hardware.BlinkM


Toolbox.NETMF.Hardware.BlinkM(Address = 0x09, ClockRateKhz = 100)
  • Address The I²C identifier of the BlinkM module
  • ClockRateKhz The speed of the module

Methods

  • SetColor(r, g, b) Sets the color of the LED
  • SetColor(color) Sets the color of the LED
  • FadeColor(r, g, b) Fades the color of the LED
  • FadeColor(color) Fades the color of the LED
  • SendCommand(Command, Arguments) Sends advanced commands to the LED

How to connect

Toolbox.NETMF.Hardware.BlinkM.png

Sample code in C#

BlinkM Led = new BlinkM();

while (true)
{
    Debug.Print("Red");   Led.SetColor(0xff0000); Thread.Sleep(1000);
    Debug.Print("Green"); Led.SetColor(0x00ff00); Thread.Sleep(1000);
    Debug.Print("Blue");  Led.SetColor(0x0000ff); Thread.Sleep(1000);
}

Sample code in VB

Dim Led As BlinkM = New BlinkM()

Do
    Debug.Print("Red") : Led.SetColor(CInt(Tools.Hex2Dec("ff0000"))) : Thread.Sleep(1000)
    Debug.Print("Green") : Led.SetColor(CInt(Tools.Hex2Dec("00ff00"))) : Thread.Sleep(1000)
    Debug.Print("Blue") : Led.SetColor(CInt(Tools.Hex2Dec("0000ff"))) : Thread.Sleep(1000)
Loop

Related documents

Last edited Jan 1, 2013 at 4:06 PM by Garrcomm, version 5