Run Code in Planner not updating

If I change the code in planner or edit the code then run new code, the planner still runs the old code
but if I unplug the imp then plug it back in the new code runs in the planner.

Sounds like your code has an infinite loop in it, which means the imp isn’t getting the run message. Got any while(1)'s? The correct way to do stuff repeatedly on the imp is with imp.wakeup().

Hi Hugo,
Your right, I did have an infinite loop in the imp code. I just assumed that modifying the code to remove the loop then selecting the run new code would stop the imp then update it.

Yeah, user code is given priority over the TCP stack to give most consistent performance hence infinite loops can’t be interrupted.

Moreover, the code that runs the Squirrel and the code that fetches new Squirrel run on the same thread. If it’s busy doing one, it can’t possibly be doing the other simultaneously.

Peter