Interesting discovery - Can you figure out what's wrong?

holmes4:
We deal with arduinos here not controllers/pics/pis/ ect.

I see... So an Arduino's not a Micro controller then?

But thanks for the friendly greetings and advice. :wink:

Just want to point out that its worth ensuring all your code paths return values. In this case, the second "if" did not return a value at all times causing my Arduino "Micro Controller" to lock up.
(The IDE also doesn't warn you of this issue)

Exception handling would be nice for this, but too resource intensive for a MCU I take it..