for thww WS2811 RGB

Dependencies:   mbed

Fork of WS2811 by Bulme Projekt

WS2811.h

Committer:
Drohne
Date:
2016-04-18
Revision:
1:165513b4e20a
Parent:
0:c6a6fa47dadc
Child:
2:ccf3f0c36dae

File content as of revision 1:165513b4e20a:

/*
*           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.1          
#define LED_MAX 3           // define the RGBs you have
#define OFF_DELAY 0.01

void sendColours(int pos, uint8_t r, uint8_t g, uint8_t b);
void clear();
void runlight(float waittime);