mirror of
https://github.com/Makuna/NeoPixelBus.git
synced 2025-08-09 22:04:27 +02:00
Updated FAQ #3 (markdown)
@@ -41,7 +41,7 @@ void setup() {
|
||||
|
||||
void PixelCountChanged(uint16_t newCount) {
|
||||
if (strip != NULL) {
|
||||
delete Strip; // delete the previous dynamically created strip
|
||||
delete strip; // delete the previous dynamically created strip
|
||||
}
|
||||
strip = new NeoPixelBus<NeoGrbFeature, Neo800KbpsMethod>(newCount, Pin); // and recreate with new count
|
||||
strip->Begin();
|
||||
@@ -52,7 +52,7 @@ void loop() {
|
||||
if (strip != NULL) {
|
||||
// some arbitrary code
|
||||
for (uint16_t pixel = 0; pixel < strip.PixelCount(); pixel++) {
|
||||
strip.SetPixelColor(pixel, red);
|
||||
strip->SetPixelColor(pixel, red);
|
||||
}
|
||||
strip->Show();
|
||||
}
|
||||
|
Reference in New Issue
Block a user