New to python, but this may be an issue with Thonny also.
The code is an infinite loop acting as a timer.
While True:
#Determine if relay needs to turn on off
If I have a small number of timer instructions I can still click stop in Thonny and everything works fine, but if I have like 25, thonny completely locks up, can't even close it, but the code is still running fine and the rest of the os works fine. The schedule is a json file loaded into memory.
Can't put a wait in the loop because it is dealing with ms timing, so a half second wait can mess the schedule up.
Is there a better IDE for something like this than Thonny or a good way to stop the code without rebooting?
Haven't done any threadding yet, but if needed I will rewite. 4gb Pi, so memory shouldn't be an issue.