This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
In order to evaluate the true randomness of "random8", I generated 64K of random bytes using random8, and ran it through "ent" to analyze the entropy: | |
Entropy = 8.000000 bits per byte. | |
Optimum compression would reduce the size | |
of this 65536 byte file by 0 percent. | |
Chi square distribution for 65536 samples is 0.00, and randomly | |
would exceed this value more than than 99.99 percent of the times. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <FastLED.h> | |
// Example showing how to make a simple striped color palette, | |
// and use it to animated blended color bars | |
#define LED_PIN 3 | |
#define NUM_LEDS 30 | |
CRGB leds[NUM_LEDS]; | |
CRGBPalette16 currentPalette; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <FastLED.h> | |
#define LED_PIN 3 | |
#define LED_TYPE WS2811 | |
#define COLOR_ORDER RGB | |
#define COLOR_CORRECTION CRGB(255,172,240) | |
#define BRIGHTNESS 64 | |
#define NUM_LEDS 100 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// See also __uqadd8 | |
static inline uint8x4_t uqadd8x4 (uint8x4_t xs, uint8x4_t ys) | |
{ | |
uint8x4_t sums; | |
asm volatile( | |
"uqadd8 %[sums], %[xs], %[ys]" | |
: [sums] "=r" (sums) | |
: [xs] "%r" (xs), [ys] "r" (ys)); | |
return sums; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include "FastLED.h" | |
#define LED_PIN 3 | |
#define LED_TYPE WS2811 | |
#define COLOR_ORDER GRB | |
#define NUM_LEDS 30 | |
CRGB leds[NUM_LEDS]; | |
#define BRIGHTNESS 120 | |
#define DENSITY 80 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include "FastLED.h" | |
#define LED_PIN 3 | |
#define LED_TYPE WS2811 | |
#define COLOR_ORDER RGB | |
#define NUM_LEDS 50 | |
CRGB leds[NUM_LEDS]; | |
// Twinkling 'holiday' lights that fade up and down in brightness. | |
// Colors are chosen from a palette; a few palettes are provided. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include "FastLED.h" | |
// FastLED "100-lines-of-code" demo reel, showing just a few | |
// of the kinds of animation patterns you can quickly and easily | |
// compose using FastLED. | |
// | |
// This example also shows one easy way to define multiple | |
// animations patterns and have them automatically rotate. | |
// | |
// -Mark Kriegsman, December 2014 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <FastLED.h> | |
#define LED_PIN 3 | |
#define NUM_LEDS 30 | |
#define BRIGHTNESS 96 | |
#define LED_TYPE WS2811 | |
#define COLOR_ORDER GRB | |
CRGB leds[NUM_LEDS]; | |
#define UPDATES_PER_SECOND 100 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include "FastLED.h" | |
// Quick and dirty 2-D fireworks simulation | |
// Originaly designed (and tuned for) an Adafruit 5x8 WS2811 shield | |
// by Mark Kriegsman, July 2013 | |
// (and not updated since, so it's a little stale, | |
// but it's a good starting point, if rather uncommented.) | |
#define NUM_LEDS 40 | |
CRGB leds[NUM_LEDS]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include "FastLED.h" | |
// Quick and dirty 2-D fireworks simulation | |
// Originaly designed (and tuned for) a 16x16 matrix | |
// by Mark Kriegsman, July 2013 | |
// (and not updated since, so it's a little stale, | |
// but it's a good starting point, if rather uncommented.) | |
#define PIXEL_WIDTH 15 | |
#define PIXEL_HEIGHT 16 |