IR receive not consistent

I have been challenged by my daughter to build a wireless baseball scoreboard. Being new at using and programming the Arduino I have tried copying and modifying various coding from Google. My current problem is that I can upload a simple IR 7 segment program (IR control of 7 segment led - works) to my Mega and it responds correctly to inputs. The display matches what I input on the universal remote. When I try to load a more complex IR program (scoreboard v7 FINALmodified) for some reason the Mega doesn’t appear to see the IR inputs. I get no TX light, and the serial monitor shows no activity. Everything related to the IR is exactly the same between the program which works and the program which doesn’t work. I am lost and running out of time.

scoreboard_v7_FINALmodified.ino (29 KB)

IR_control_of_7_segment_led_-_works.ino (1.75 KB)


She better clean her room for the rest of here stay in your home.

For debug purposes, add some 'defaults' to the switch-case sections.

Add some: Serial.println("I got here"); statements to track down where you think the code gets to for IR remote RX input.

There is a huge amount of code in the non-working system that is not in the working system. I'd start with the working system, and add stuff from the non-working system, until the working system quits working. Then, I'd know what I could not do.

Thanks to you both for the reply and the suggestions. It looks like it stops working right at the start of the IR decode process in the loop. I have tried a test program by eliminating all but the first three 75HC595s and the associated 7 segment LEDs, without much success. What I can’t figure out is why I am losing my TX light when I load this program. I press any controller button and nothing happens. With the small program I posted every press of the button gets me a TX light.

Comment blocks of code with /* section commented out */
It is really just a process of elimination.


Like 'Sir Paul' said, maybe take what is working and add code to it until the problem shows its head.