Hi, thanks for your reply.
For driving LEDs, i used to adopt fastled library which is stable and easy to use. I adopted mega256 and therefore memory is not a concern.
Instead of driving LEDs, I am seeking solution on how to get signals from 20 Infrared sensors. Most of sensors only have three pins - VCC / GND / signal (High when object detected while low when no object)
One of the feasible way may be: each IR sensor can output signal & address in the same bus like I2C. Controller acts as a master while sensors work as slave. When sensor gets detection, it acknowledges controller.
So far, i cannot find any IR sensor can output I2C with programmable output address.
See if any one has idea on how to handle so many IR sensor in the same bus.