I have tried this on both an Arduino Uno and an Arduino Mega2560. my issue is as follows. Without a 150 LED string of addressable pixels attached, I can pretty consistently capture and read the input from an IR sensor connected at digital pin 2. Once I connect a addressable string of 150 LEDs at digital pin 3, it seems that I am no longer able to reliably read the input from the IR sensor. This seems to be more the case when the pattern I have running on the LED string is heavy, i.e., the majority of the pixels are lit, or the brightness is high. This project also includes a mic connected at analog 5 and aref. Additionally, I am using a 16×2 LCD Display & Keypad Shield connected at digital pins 4-9. Is there any reason that the voltage difference could screw with reading the IR input.

  • What are you using to power the LEDs? Have you tried enclosing all of the LEDS in something light-proof, like a cardboard box? – gbulmer Jan 5 '16 at 23:05
  • turned out I needed to switch to a hardware interrupt for the IR sensor on the more cycle-intensive routines. the short interval didn't allow for sufficient time to poll for incoming IR data. – FatherStorm Jan 7 '16 at 13:39
  • 1
    Interesting! Maybe you could post an answer to your own question? So does taking that hardware interrupt affect the LEDs? The timing for the WS2812/B LEDs is quite tight, so I'd expect some visible effect when IR is being received. – gbulmer Jan 7 '16 at 15:11

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.