Hi! Just playing around with some rings i for some reason the function addActiveSegment(seg) does not work for me. Very easy sketch.
#include <WS2812FX.h>
#define LED_COUNT 32
#define LED_PIN 37
#define BUTTON_1 35
int enableStepper = 26;
int dirStepper = 23;
int stepStepper = 24;
#define RED (uint32_t)0xFF0000
#define GREEN (uint32_t)0x00FF00
#define BLUE (uint32_t)0x0000FF
#define WHITE (uint32_t)0xFFFFFF
#define BLACK (uint32_t)0x000000
#define YELLOW (uint32_t)0xFFFF00
#define CYAN (uint32_t)0x00FFFF
#define MAGENTA (uint32_t)0xFF00FF
#define PURPLE (uint32_t)0x400080
#define ORANGE (uint32_t)0xFF3000
#define PINK (uint32_t)0xFF1493
#define GRAY (uint32_t)0x101010
#define ULTRAWHITE (uint32_t)0xFFFFFFFF /* for RGBW LEDs */
WS2812FX ws2812fx = WS2812FX(LED_COUNT, LED_PIN, NEO_GRB + NEO_KHZ800);
void setup() {
pinMode(BUTTON_1, INPUT_PULLUP);
ws2812fx.init();
ws2812fx.setBrightness(255);
for (int i=0; i <= 9; i++) {
int firstLED = i*16;
int lastLED = (i*16) + 15;
ws2812fx.setIdleSegment(i, firstLED, lastLED, FX_MODE_BLINK, WHITE, 1000, NO_OPTIONS);
ws2812fx.start();
}
}
void loop() {
ws2812fx.service();
if (!digitalRead(BUTTON_1)) {
//ws2812fx.setSegment(0, 0, 15, FX_MODE_BLINK, GREEN, 100, NO_OPTIONS);
addActiveSegment(0);
}
}
AppData\Local\Temp\arduino_modified_sketch_914290\Blink.ino: In function 'void setup()':
Blink:41:21: error: 'addActiveSegment' was not declared in this scope
addActiveSegment(0);
^
exit status 1
'addActiveSegment' was not declared in this scope
Hi! Just playing around with some rings i for some reason the function addActiveSegment(seg) does not work for me. Very easy sketch.