Hi Guy,
I'm the last one that should be offering advice cos it's all new to me and I couldn't even get a driver working for the Wemos D1 Mini, but just to let you know - the new style Serial Dev Kit module that I'm using connects up so rock-solid that I've been leaving it on and connected 24 hours a day, and running various different Basic scripts without even so much as a reboot - so bad connection isn't likely to be an ESP Basic problem.
But program errors can often result in broken connections even though there might not be any other obvious sign of an error. You didn't say what version you flashed, and I remember the Blink example causing me problems in V2 because of the different way of using print with multiple arguments (V2 expects "&" concatenation symbol for multiple arguments, which wasn't needed in the V1 example).
Neither did you mention about saving the script, so that does raise the question of whether ESP Basic was actually trying to run your saved edited script, or perhaps trying to run recently-flashed empty memory.
So have you tried running something else to see if that makes any different to the problems you're having. I've just tried the Web GUI example below and it works on V2 without change (just remember to tidy up the last line to get the final "end" instruction without the last-line clutter which always seems to get appended when pasting using SELECT ALL, ie:
end - See more at:
viewtopic.php?f=40&t=4848#sthash.alBXcNNu.dpufCan't suggest much else I'm afraid, but perhaps trying to run something different might help you pin things down a bit more.
Code: Select allcls
print "hello world"
let bla = "Test contents of textbox"
textbox bla
button "This is my button 1" [test1]
button "This is my button 2" [test2]
button Exit [TestExit]
wait
[test1]
print "You Clicked on 1"
print bla
wait
[test2]
print "You CLiked on 2"
let bla = "number 2 was clicked"
wait
[TestExit]
cls
print "hello world"
let bla = "Test contents of textbox"
textbox bla
button "This is my button 1" [test1]
button "This is my button 2" [test2]
button Exit [TestExit]
wait
[test1]
print "You Clicked on 1"
print bla
wait
[test2]
print "You CLiked on 2"
let bla = "number 2 was clicked"
wait
[TestExit]
end