for thww WS2811 RGB

Dependencies:   mbed

Fork of WS2811 by Bulme Projekt

WS2811.h

Committer:
nimaaghli
Date:
2016-11-23
Revision:
4:46b52a6a943b
Parent:
3:2fbb2f0e79fb

File content as of revision 4:46b52a6a943b:

/*
*           Creator: Matthias Hemmer
*           created: 22.06.2016
*       Board: Himbed M0+
*       Processor: LPC11U68       
*
*   function: write a register of 8 bits to the WS2811 RGBs 
*   
*   supply voltage: 3V3
*   data wire: 5V
*   GND: 0V
*
*   bit: 255 brightest 
*   bit: 0 darkest
*/
#include "mbed.h"

#define HIGH_SIGNAL 9       // Logic 1
#define LOW_SIGNAL 1        // Logic 0
#define DELAY 0.00000000001   
  
////////////////////       
#define LED_MAX 1//           // switch the value for your number of pixels
////////////////////
#define middle 29//           // define the mid of the pixels: to make it work middle-1
///////////////////

#define OFF_DELAY 0.001

// define a cleary blue light
#define Green   100
#define Red     255
#define Blue    125

void sendColours(int pos, uint8_t r, uint8_t g, uint8_t b);