Not sure why this code isn't working.
Posted: Tue Sep 13, 2016 3:50 pm
I'm running the latest Basic version on a NodeMCU esp. For the moment, I am simply trying to retrieve latitude and longitude from a json and print it. If I push "run", the esp disconnects seemingly at once, returning no data, with the computer trying to load forever until i power cycle the esp. If I run it in debug, the code runs through about 4 times, returning the values correctly, then the esp disconnects. Can anyone offer me any insight?
Thanks
Pardon the crudeness, very new to coding.
Thanks
Code: Select all
delay 1000
Do
serialflush
cls
let query="api.open-notify.org/iss-now.json"
delay 1000
let ret = wget(query)
let latitude = json(ret,"latitude")
let longitude = json(ret,"longitude" )
print latitude & longitude
Loop until 0
Pardon the crudeness, very new to coding.