This library lets you control the addressable RGB LED strips from Pololu Robotics. Forked to add selectable colour order (Support RGB or GRB Leds)

Fork of PololuLedStrip by David Grayson

Revision:
10:f1bb84b97788
Parent:
9:6ffb85d69eaf
Child:
12:b6df8ac053c8
--- a/PololuLedStrip.cpp	Fri Mar 01 03:57:49 2013 +0000
+++ b/PololuLedStrip.cpp	Fri Mar 01 04:15:35 2013 +0000
@@ -10,7 +10,7 @@
     int f_mhz = SystemCoreClock / 1000000;
     
     // Arrange for a 700 nanosecond delay between the rise time and the fall time for a 0 bit.
-    led_strip_write_delays[0] = 700*f_mhz/1000 - 25 - 5;
+    led_strip_write_delays[0] = 700*f_mhz/1000 - 32;
     
     // Arrange for a 600 nanosecond delay between the fall time for a 0 bit and the fall time for a 1 bit.
     // This means the pulses representing a 1 will be 700+600 = 1300 nanoseconds.
@@ -19,6 +19,10 @@
     // Arrange for a 1200 nanosecond delay between the fall time for a 1 bit and rise time of the next bit.
     // This means the period of the signal will be 2500 nanoseconds.
     led_strip_write_delays[2] = 1200*f_mhz/1000 - 24;
+    
+    led_strip_write_delays[0] <<= 1;
+    led_strip_write_delays[1] <<= 1;
+    led_strip_write_delays[2] <<= 1;
 }
 
 PololuLedStrip::PololuLedStrip(PinName pinName)