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:
authorMark Kriegsman <1334634+kriegsman@users.noreply.github.com>2021-04-10 20:27:00 +0300
committerGitHub <noreply@github.com>2021-04-10 20:27:00 +0300
commit1a273c8d3c99bbecccd9e2b1456516da8156415b (patch)
treef88a5df28d31e2eda9a073109347a7fdfa5fa2c2 /examples/Noise/Noise.ino
parentb5874b588ade1d2639925e4e9719fa7d3c9d9e94 (diff)
parent7e070d6489f845688616e9d4822e5df62d6078f5 (diff)
Merge pull request #1218 from marmilicious/master
Some Modernization updates for #1208
Diffstat (limited to 'examples/Noise/Noise.ino')
-rw-r--r--examples/Noise/Noise.ino10
1 files changed, 6 insertions, 4 deletions
diff --git a/examples/Noise/Noise.ino b/examples/Noise/Noise.ino
index b0635702..f11d75d7 100644
--- a/examples/Noise/Noise.ino
+++ b/examples/Noise/Noise.ino
@@ -7,8 +7,10 @@
// Params for width and height
const uint8_t kMatrixWidth = 16;
const uint8_t kMatrixHeight = 16;
+
#define MAX_DIMENSION ((kMatrixWidth>kMatrixHeight) ? kMatrixWidth : kMatrixHeight)
#define NUM_LEDS (kMatrixWidth * kMatrixHeight)
+
// Param for different pixel layouts
const bool kMatrixSerpentineLayout = true;
@@ -62,15 +64,15 @@ uint16_t speed = 20; // a nice starting speed, mixes well with a scale of 100
uint16_t scale = 311;
// This is the array that we keep our computed noise values in
-uint8_t noise[MAX_DIMENSION][MAX_DIMENSION];
+uint16_t noise[MAX_DIMENSION][MAX_DIMENSION];
void setup() {
// uncomment the following lines if you want to see FPS count information
// Serial.begin(38400);
// Serial.println("resetting!");
delay(3000);
- LEDS.addLeds<WS2811,2,RGB>(leds,NUM_LEDS);
- LEDS.setBrightness(96);
+ FastLED.addLeds<WS2811,2,RGB>(leds,NUM_LEDS);
+ FastLED.setBrightness(96);
// Initialize our coordinates to some random values
x = random16();
@@ -107,6 +109,6 @@ void loop() {
}
ihue+=1;
- LEDS.show();
+ FastLED.show();
// delay(10);
}