-->
Page 1 of 2

Stopping a program

PostPosted: Fri Feb 21, 2020 9:00 am
by treelike
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.

Re: Stopping a program

PostPosted: Sat May 16, 2020 7:13 pm
by Buzby
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

Re: Stopping a program

PostPosted: Sat May 23, 2020 6:13 am
by Luc Volders
http://192.168.1.65/filemng

And replace the 192.168.1.65 with the IP number of your ESP.
I'll bring you to the filemanager window and shows the other tabs too.

Luc

Re: Stopping a program

PostPosted: Fri Jun 26, 2020 8:38 am
by treelike
Thanks for the replies!

http://192.168.1.65/filemng didn't work. By the way my esp happened to be on 192.168.1.65 at the time! I like the idea of scanning an I/O pin and connecting it to a switch or something. I suppose you could use a second ESP8266 for remote control of the I/O. A bit overkill but they're cheap.

Nick.