Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/FastLED/FastLED.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'examples/Fire2012/Fire2012.ino')
-rw-r--r--examples/Fire2012/Fire2012.ino11
1 files changed, 10 insertions, 1 deletions
diff --git a/examples/Fire2012/Fire2012.ino b/examples/Fire2012/Fire2012.ino
index 0929e2f2..e65982a8 100644
--- a/examples/Fire2012/Fire2012.ino
+++ b/examples/Fire2012/Fire2012.ino
@@ -8,6 +8,8 @@
#define BRIGHTNESS 200
#define FRAMES_PER_SECOND 60
+bool gReverseDirection = false;
+
CRGB leds[NUM_LEDS];
void setup() {
@@ -90,7 +92,14 @@ void Fire2012()
// Step 4. Map from heat cells to LED colors
for( int j = 0; j < NUM_LEDS; j++) {
- leds[j] = HeatColor( heat[j]);
+ CRGB color = HeatColor( heat[j]);
+ int pixelnumber;
+ if( gReverseDirection ) {
+ pixelnumber = (NUM_LEDS-1) - j;
+ } else {
+ pixelnumber = j;
+ }
+ leds[pixelnumber] = color;
}
}