And before anything thanks for the great ressources. I am testing an arduino uno on a 704 addressable led strip. The connections of all the 704 leds work fine with a symphony controller. When I connect everything on the arduino uno board I can only get 610 led working. Any number above that and the program does not run. I have tried several programs and the limit is always the same.
Here is the setup
– 26 amp power adapter
– arduino uno with data on pin 6, grd and 5 v connection.
– every 88 led I have a direct grd and 5v line to the power adapter
– I use a 470Ω resistor on the breadboard on the data line.
Have I reached a limit for the arduino processor or there anything wrong in my setup?
Thanks
Here it is
The issue I have is that it does not run above 610.
#include <Adafruit_NeoPixel.h>
#define PIN 6
// Parameter 1 = number of pixels in strip
// Parameter 2 = pin number (most are valid)
// Parameter 3 = pixel type flags, add together as needed:
// NEO_KHZ800 800 KHz bitstream (most NeoPixel products w/WS2812 LEDs)
// NEO_KHZ400 400 KHz (classic 'v1' (not v2) FLORA pixels, WS2811 drivers)
// NEO_GRB Pixels are wired for GRB bitstream (most NeoPixel products)
// NEO_RGB Pixels are wired for RGB bitstream (v1 FLORA pixels, not v2)
Adafruit_NeoPixel strip = Adafruit_NeoPixel(610, PIN, NEO_GRB + NEO_KHZ800);
void setup() {
strip.begin();
strip.show(); // Initialize all pixels to 'off'
}
void loop() {
// Some example procedures showing how to display to the pixels:
theaterChaseRainbow(50);
}
//Theatre-style crawling lights with rainbow effect
void theaterChaseRainbow(uint8_t wait) {
for (int j=125; j < 128; j++) { // cycle all 256 colors in the wheel
for (int q=0; q < 3; q++) {
for (int i=0; i < strip.numPixels(); i=i+3) {
strip.setPixelColor(i+q, Wheel( (i+j) % 255)); //turn every third pixel on
}
strip.show();
delay(wait);
for (int i=0; i < strip.numPixels(); i=i+3) {
strip.setPixelColor(i+q, 0); //turn every third pixel off
}
}
}
}
// Input a value 0 to 255 to get a color value.
// The colours are a transition r - g - b - back to r.
uint32_t Wheel(byte WheelPos) {
if(WheelPos < 85) {
return strip.Color(WheelPos * 3, 255 - WheelPos * 3, 0);
} else if(WheelPos < 170) {
WheelPos -= 85;
return strip.Color(255 - WheelPos * 3, 0, WheelPos * 3);
} else {
WheelPos -= 170;
return strip.Color(0, WheelPos * 3, 255 - WheelPos * 3);
}
}
You have hit the limit for Uno. It has only 2K bytes of ram memory, and 3 bytes are needed for each led, plus extra memory for your other variables and other purposes.
These days, there are many models of Arduino with more ram memory, you don't have to use a Mega if that is a problem.
I create images with generative code in processing.
I use blend modes to composite layers by subtracting, adding multiplying or dividing rgb color values.
I then print and image and build a light box with rgb addressable led to create a kinetic animation using variation in the rgb values. The permutations of rgb values under the printed surface create an animated image.
The code I plan on writing is an animation sequence in which each led is referenced in a grid pattern.
Nothing really complex in terms of code at this point.
So I guess for this project I just need to get a bit more memory in order to accommodate the 704*3 bites and the code.
Thanks again for the precious advice.
Pro Micro (2.5K ram)
Nano Every (6K ram)
Itsy Bitsy M0 (32K ram, 3.3V but special pin for 5V NeoPixel strips)
There are lots more 32-bit boards, such as esp8266/esp32, teensy 3.x, Nano 33... but they are all 3.3V which means they may not reliably drive your 5V strip. That can be fixed with a 74hc14 or 74hct14 chip to boost the 3.3V signal up to 5V.