General area when it fits no where else

Moderator: Mmiscool

User avatar
By treelike
#85770 Stupid question.....

I've got an ESP running ESPBASIC constantly transferring data from weather sensors in the garden to a server. Let's say I want to tweak the ESPBASIC program e.g. to add another sensor. How do I stop the program running so I can log into the ESP and edit it?

I could simply reset the ESP or power cycle it but I want to set it to run the program at startup so that it continues to work if the power is interrupted in normal operation.

The only way I can think of doing it in theory is to connect the ESP to my computer, reinstall ESPBASIC and type in the program again with the modifications, which of course is ridiculous.

Actually I think I've managed to log in in such a scenario in the past by repeatedly power cycling/ logging in but surely there is a more elegant way.
User avatar
By Buzby
#87140 Hi Treelike,

This seems to be a very quiet forum, that might explain why you have not had an answer.

I'm a noobie too, and faced the same problem.

My solution was to regularly check an io pin and do an 'end' if the pin was triggered. I used pin 0, the 'flash' button.

' Toggle LED 100 times
for x = 0 to 99

io(po,2,1)
delay 500
io(po,2,0)
delay 500

' Break if 'flash' button pressed.
if io(pi,0) = 0 then
end
endif

next x


I does mean you need to physically access the ESP device, I don't know of a way to stop the code over the air.

Cheers,

Buzby