Current News

Moderator: Mmiscool

User avatar
By viscomjim
#42066 Cwilt, I just tried a simple openweathermap test and the json parsing works excellent. Just find the name of the field you want. I did a quick test using this code...

Code: Select allcls
button "Click to check " [checkit]
button "Exit " [Exit]
timer 30000 [checkit]
wait
'
[checkit]
WBString = "api.openweathermap.org/data/2.5/weather?id=4174855&units=imperial&appid=YOURAPIKEYHERE"
a$ = wget(WBString)
serialprintln a$

serialprintln json(a$,"description")
serialprintln json(a$,"temp")
serialprintln json(a$,"pressure")
serialprintln json(a$,"humidity")
serialprintln json(a$,"name")
serialprintln json(a$,"speed")
serialprintln json(a$,"deg")
wait

[Exit]
timer 0
wprint "<a href='/'>Menu</a>"
end


You have to put your own api key in there and it will work great.
User avatar
By forlotto
#42079 Did anyone else get an eye blister ?

I saved my code all 84 lines and the damn thing was saved before I could even think about what to do next!

Sheesh!

I hit save and all I seen was 84 and a box pop up saying it was done unreal.

If you upload a file it needs to be named default.bas.