Thanks, that was the problem. When I added the LED stuff I change the flow of the loop, this meant that the connections I was accidentally leaving open were no longer timing out. My previous code was just getting luck to miss this bug
Thanks, that was the problem. When I added the LED stuff I change the flow of the loop, this meant that the connections I was accidentally leaving open were no longer timing out. My previous code was just getting luck to miss this bug