A Basic Interpreter written from scratch for the ESP8266

Moderator: Mmiscool

User avatar
By raintime
#55324 I want to print "starting..." immediately, but for example the code below does not print "starting..." until after the delay:

memclear
print "starting..."
returngui
delay 5000
end
User avatar
By Mmiscool
#55325 When hitting the run button it takes a moment or 2 for the web sockets in the browser to connect. This unfortunately is unavoidable.
User avatar
By raintime
#55338
Mmiscool wrote:When hitting the run button it takes a moment or 2 for the web sockets in the browser to connect. This unfortunately is unavoidable.


If instead of Returngui, I add a few lines as shown below, everything works great because the the web sockets get connected.

Is there a way to make the "returngui" command emulate this little block of code? Would be very useful!

print "Starting..."

timer 3000,[mybranch]
wait
[mybranch]
timer 0

delay 5000 'or anything...
end
User avatar
By raintime
#55340
Mmiscool wrote:When hitting the run button it takes a moment or 2 for the web sockets in the browser to connect. This unfortunately is unavoidable.



I just tested this block of code (below) at the very beginning of the program, and that also works great. I would be totally willing to wait a few extra seconds after pressing the RUN button for the web sockets to connect before the program actually starts.


timer 2000,[mybranch]
wait
[mybranch]
timer 0