for thww WS2811 RGB

Dependencies:   mbed

Fork of WS2811 by Bulme Projekt

WS2811.h

Committer:
Drohne
Date:
2016-04-29
Revision:
2:ccf3f0c36dae
Parent:
1:165513b4e20a
Child:
3:2fbb2f0e79fb

File content as of revision 2:ccf3f0c36dae:

/*
*           Creator: Matthias Hemmer
*           created: 15.04.2016
*       Board: Himbed v.2 Bulme
*       Processor: Cortex M0       
*
*   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 4       // Logic 1
#define LOW_SIGNAL 1        // Logic 0
#define DELAY 0.000000000001          
#define LED_MAX 57           // define the RGBs you have
#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);
void clear();
void runlight(float waittime);