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

Files at this revision

API Documentation at this revision

Comitter:
DavidEGrayson
Date:
Thu Sep 08 23:53:42 2016 +0000
Parent:
22:5368af3ff07d
Child:
24:5c01a6fa1556
Commit message:
Added a comment.;

Changed in this revision

PololuLedStrip.cpp Show annotated file Show diff for this revision Revisions of this file
--- a/PololuLedStrip.cpp	Thu Sep 08 23:14:02 2016 +0000
+++ b/PololuLedStrip.cpp	Thu Sep 08 23:53:42 2016 +0000
@@ -20,11 +20,15 @@
         // Try to generally compute what the delays should be for a wide range of clock frequencies.
         
         // The fudge factors below were experimentally chosen so that we would have
-        // ~100/840 ns pulses and a ~1430 ns period on the mbed NXP LPC1768 (96 MHz Cortex-M3).
+        // ~100 ns and ~840 ns pulses and a ~1430 ns period on the mbed NXP LPC1768 (96 MHz Cortex-M3).
         // There seem to be some ~100 ns inconsistencies in the timing depending on which example program is
         // running; the most likely explanation is some kind of flash caching that affects the timing.
         // If you ever change these numbers, it is important to check the the subtractions below
         // will not overflow in the worst case (smallest possible f_mhz).
+        //
+        // On an STM32F303K8 (72 MHz Cortex-M4), these delays give us ~170 ns and ~840 ns pulses
+        // and a ~1595 ns period, and there were no timing differences between the two
+        // example programs.
         led_strip_write_delays[0] = 750*f_mhz/1000 - 33;
         led_strip_write_delays[1] = 550*f_mhz/1000 - 20;    
     }