Hi There.
I am trying to get 16 lines of LED to work on a Teensy, but I have problems with pin 1 which flickers and 6 + 7, which makes tivoli lights.
I am trying to get 16 lines of LED to work on a Teensy, but I have problems with pin 1 which flickers and 6 + 7, which makes tivoli lights.
Code:
#define NUM_OF_OUTPUTS 16
#define MAX_NUM_LED_PER_OUTPUT 216
#define NUM_CHANNEL_PER_LED 4 // do not change this
const int num_channel_per_output = MAX_NUM_LED_PER_OUTPUT * NUM_CHANNEL_PER_LED;
const int num_universes_per_output = (num_channel_per_output%512) ? num_channel_per_output/512+1 : num_channel_per_output/512;
const int num_led_per_output = num_universes_per_output*512/NUM_CHANNEL_PER_LED;
#include <OctoWS2811.h>
DMAMEM uint32_t displayMemory[num_led_per_output * NUM_OF_OUTPUTS];
uint32_t drawingMemory[num_led_per_output * NUM_OF_OUTPUTS];
uint8_t pinList[16] = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 14, 15, 18, 19, 22, 23}; //PIN 1 flicker,6 and 7 Tivoli light
const int LEDconfig = WS2811_RGBW | WS2811_800kHz;
OctoWS2811 LEDS(num_led_per_output, displayMemory, drawingMemory, LEDconfig, NUM_OF_OUTPUTS, pinList);
void setup() {
LEDS.begin();
}
void loop() {
uint8_t val = map(sin(millis()/100), -1.0, 1.0, 0x00, 0xFF);
for (int i = 0; i < NUM_OF_OUTPUTS * num_led_per_output; i++) {//CHANGE
LEDS.setPixel(i, val, val, val, val);
}
LEDS.show();
}