Getting back into Arduino after years of a break. Attempting a rather ambitious project utilizing 462 WS2811 LED's. I have gotten the IR remote to control the LEDs with limited success. I have a few issues to tackle, however the first being something I suspect to be rather simple. I am able to use the remote up to 341 LEDs, anything over that amount the remote will not trigger the commands. I am able to utilize all 462 using example sketches, however not with the IR Remote sketch. There are 6 tabs, i included the define tab as thats the only thing i am changing. However i can post the rest if needed!
//Define Tab
#include <MyRGBcolors.h> // My RGB color library for WS2812b strip
//#include <MyGRBcolors.h> // My GRB color library for WS2811 strip
//#include "./Libraries/MyRGBcolors.h"// My color library for RGB WS2812b strip
//#include "./libraries/MyGRBcolors.h"// My color library for GRB WS2812b strip
#include <Adafruit_NeoPixel.h> // Library for WS2811/WS2812b Led strips
#include "IRremote.h" // Library for IR Remote
#define IR_Receiver 4 // Pin 1 of IR receiver to Arduino digital Pin 11
#define LED_PIN 6 // Data Pin of Led strip
#define LED_COUNT 341 // Number of LEDs in your strip
//#define StatusLed_PIN 13 // [OPTIONAL] Pin of the status Led
#define SPEED 20 // Speed of each Color Transition (in ms)
#define NOW 0 // Transition happen instantly
#define RAINBOW_SPEED 10 // Rainbow Transition speed
#define RAINBOW_REPEAT 1 // How many times the Rainbow Cycle is repeated
#define BRIGHTNESS 55 // Initial Brightness
#define BRIGHTNESS_INCREMENT 50 // Increase/Decrease Brightness by this value
#define MIN_BRIGHTNESS 5 // Minimum Brightness
#define MAX_BRIGHTNESS 255 // Maximum Brightness
int currentBrightness; // This will save the current Brightness
int buttonPushCounterA = 0; // Counts how many times the button has been pushed
int buttonStateA = 0; // Current state of the button
int lastButtonStateA = 0; // Previous state of the button
// Initialize Led Strip
Adafruit_NeoPixel strip = Adafruit_NeoPixel(LED_COUNT, LED_PIN, NEO_GRB + NEO_KHZ800);
// Initialize IR Receiver
IRrecv irrecv(IR_Receiver); // create instance of 'irrecv'
decode_results results; // create instance of 'decode_results'
How much dynamic memory does the IDE report after compiling. Seeing that you're using the Adafruit Neopixel library, add three bytes for every pixel (or subtract it from the free space).
A further problem can be that updating 462 pixels takes time; during that time interrupts are disabled and that might result in corrupt IR codes or no IR codes being received.
Here are the results. Its 1386 bytes just for the LED controls. So adding that to the Global variables puts me at 2268. So am starting to think you are right about the interrupts. If my calculations are right, strictly from a memory stand point i should be able to control closer to 387 LEDs.
Sketch uses 12718 bytes (39%) of program storage space. Maximum is 32256 bytes.
Global variables use 882 bytes (43%) of dynamic memory, leaving 1166 bytes for local variables. Maximum is 2048 bytes.
It's not the interrupts (yet), it's your available RAM (dynamic memory).
You might be able to optimise your sketch to make more dynamic memory available but if you will be able to get it down to around 1600 bytes (safe area) is debatable.
Show your sketch if you want people to advise on that.
Sorry for the delay, life and work took over for a bit. In the mean while I rewrote the code to be super basic just to test things out. I eliminated all animations and have only 4 commands programmed. All of which work perfectly with limited LED's however when I up the amount the code stops responding.
Sketch uses 13360 bytes (41%) of program storage space. Maximum is 32256 bytes.
Global variables use 974 bytes (47%) of dynamic memory, leaving 1074 bytes for local variables. Maximum is 2048 bytes.
Add 200 neopixels and you're at approx. 1600 bytes which is kind-of a safe limit. Use 341 neopixels and you're close to the maximum which will not leave much space for function calls and ISRs to work properly; that is the cause of your problem.