Author Options:

stop while loop with remote? Answered

how can I stop the while loop by using an IR remote? I have different modes to control an RGB led and I want it to flash quick but when I try to stop the while loop by pressing another button on the remote it doesn't work. any ideas

case 0xFFE817: //Quick
if (results.value == 0xFFE817){
lastCode = results.value;

while (0xFFE817){
randRed = random(0, 255);
randGreen = random(0, 255);
randBlue = random(0, 255);
setColor(randRed, randGreen, randBlue);
if (results.value == 0xFF22DD){