@@ -67,6 +67,7 @@ NTPClient timeClient(ntpUDP, "pool.ntp.org", utcOffsetInSeconds);
67
67
#define LED_TYPE WS2812B
68
68
#define COLOR_ORDER GRB
69
69
#define NUM_LEDS 256
70
+ #define NUM_LEDS_3 NUM_LEDS * 3
70
71
71
72
#define MILLI_AMPS 2000 // IMPORTANT: set the max milli-Amps of your power supply (4A = 4000mA)
72
73
#define FRAMES_PER_SECOND 120 // here you can control the speed. With the Access Point / Web Server the animations run a bit slower.
@@ -1459,9 +1460,10 @@ void waterFibonacci() {
1459
1460
}
1460
1461
1461
1462
/* *
1462
- * Emits arcs of color pertruding from the center to the edge of the disc.
1463
+ * Emits arcs of color spreading out from the center to the edge of the disc.
1463
1464
*/
1464
1465
void emitterFibonacci () {
1466
+ static CRGB ledBuffer[NUM_LEDS]; // buffer for better fade behavior
1465
1467
const uint8_t dAngle = 32 ; // angular span of the traces
1466
1468
const uint8_t dRadius = 12 ; // radial width of the traces
1467
1469
const uint8_t vSpeed = 16 ; // max speed variation
@@ -1483,14 +1485,17 @@ void emitterFibonacci() {
1483
1485
}
1484
1486
1485
1487
// fade traces
1486
- fadeToBlackBy ( leds , NUM_LEDS, 10 );
1488
+ fadeToBlackBy ( ledBuffer , NUM_LEDS, 6 + (speed >> 3 ) );
1487
1489
1488
1490
// draw traces
1489
1491
for (uint8_t e = 0 ; e < eCount; e++) {
1490
1492
uint8_t startRadius = sub8 (beat8 (qadd8 (speed, speedOffset[e])), timeOffset[e]);
1491
1493
uint8_t endRadius = add8 (startRadius, dRadius + (speed>>5 )); // increase radial width for higher speeds
1492
- antialiasPixelAR (angle[e], dAngle, startRadius, endRadius, ColorFromPalette (gCurrentPalette , startRadius));
1494
+ antialiasPixelAR (angle[e], dAngle, startRadius, endRadius, ColorFromPalette (gCurrentPalette , startRadius), ledBuffer );
1493
1495
}
1496
+
1497
+ // copy buffer to actual strip
1498
+ memcpy (leds, ledBuffer, NUM_LEDS_3);
1494
1499
}
1495
1500
1496
1501
void wheel () {
0 commit comments