Re: V3 problem
Posted: Sun Jul 31, 2016 3:20 am
I hadn't thought of a timer, that works perfectly and I can connect using the web interface as well
Thank you
One question if you don't mind
If I have the program like this
Is it possible to get it to do something else while it's waiting for the time
Like sending the local weather data using the post command every 15 minutes but still have the timer waiting to do the rest of the program?
like this
Would something like that work or can you do something while it's "waiting"?
EDIT: I noticed if I close the webpage and then at a later stage reconnect to http://192.168.1.8/input?
It prints EVERYTHING it had previously printed as well as all the print statements inbetween
I can imagine the buffer filling up
Is there a way to clear the buffer so when I connect to http://192.168.1.8/input? it will ONLY print what happens AFTER I connect?
serialflush would clear the serial port, is there a similar command for the web socket?
Thank you
One question if you don't mind
If I have the program like this
Code: Select all
memclear
PRINT time()
timer 30*1000, [time]
wait
[time]
PRINT time()
wait
Is it possible to get it to do something else while it's waiting for the time
Like sending the local weather data using the post command every 15 minutes but still have the timer waiting to do the rest of the program?
like this
Code: Select all
memclear
PRINT time()
timer 30*1000, [time]
wait
timer 15*60*1000, [update]
wait
[time]
PRINT time()
wait
[update]
send weather update code here
wait
Would something like that work or can you do something while it's "waiting"?
EDIT: I noticed if I close the webpage and then at a later stage reconnect to http://192.168.1.8/input?
It prints EVERYTHING it had previously printed as well as all the print statements inbetween
I can imagine the buffer filling up
Is there a way to clear the buffer so when I connect to http://192.168.1.8/input? it will ONLY print what happens AFTER I connect?
serialflush would clear the serial port, is there a similar command for the web socket?