for thww WS2811 RGB

Dependencies:   mbed

Fork of WS2811 by Bulme Projekt

Committer:
Drohne
Date:
Fri Apr 15 17:55:30 2016 +0000
Revision:
0:c6a6fa47dadc
Child:
1:165513b4e20a
RGB; self programm able

Who changed what in which revision?

UserRevisionLine numberNew contents of line
Drohne 0:c6a6fa47dadc 1 /*
Drohne 0:c6a6fa47dadc 2 * Creator: Matthias Hemmer
Drohne 0:c6a6fa47dadc 3 * created: 15.04.2016
Drohne 0:c6a6fa47dadc 4 * Board: Himbed v.2 Bulme
Drohne 0:c6a6fa47dadc 5 * Processor: Cortex M0
Drohne 0:c6a6fa47dadc 6 *
Drohne 0:c6a6fa47dadc 7 * function: write a register of 8 bits to the WS2811 RGBs
Drohne 0:c6a6fa47dadc 8 *
Drohne 0:c6a6fa47dadc 9 * supply voltage: 3V3
Drohne 0:c6a6fa47dadc 10 * data wire: 5V
Drohne 0:c6a6fa47dadc 11 * GND: 0V
Drohne 0:c6a6fa47dadc 12 *
Drohne 0:c6a6fa47dadc 13 * bit: 255 brightest
Drohne 0:c6a6fa47dadc 14 * bit: 0 darkest
Drohne 0:c6a6fa47dadc 15 */#include "mbed.h"
Drohne 0:c6a6fa47dadc 16
Drohne 0:c6a6fa47dadc 17 #define HIGH_SIGNAL 4 // Logic 1
Drohne 0:c6a6fa47dadc 18 #define LOW_SIGNAL 1 // Logic 0
Drohne 0:c6a6fa47dadc 19 #define DELAY 0.1
Drohne 0:c6a6fa47dadc 20 #define LED_MAX 3 // define the RGBs you have
Drohne 0:c6a6fa47dadc 21
Drohne 0:c6a6fa47dadc 22 void sendColours(int pos, uint8_t r, uint8_t g, uint8_t b);
Drohne 0:c6a6fa47dadc 23 void off();