id$ = "3109718" ' Santander (Spain) api$ = "899exxxxxxxxxxxxxxxxxxxxxx" 'Here is your personal API
pin.mode 5, input, pullup ' GPIO5 = D1 (Wemos D1 Mini)interrupt 5, Getwait
Get:do pause 10 loop until pin(5) = 0
do pause 10loop until pin(5) = 1
wlog "getting data"
z$ = wget$("api.openweathermap.org/data/2.5/weather?id="+id$+"&appid="+api$, 80)wlog z$
sunrise$ = unixtime$(VAL(json$(z$,"sunrise")))sunset$ = unixtime$(VAL(json$(z$,"sunset")))
wlog "sunrise: " + sunrise$ wlog "sunset: " + sunset$
return
Le 26 nov. 2020 à 17:31, Electroguard <electrogua...@gmail.com> a écrit :
--
You received this message because you are subscribed to the Google Groups "Annex WiFi RDS" group.
To unsubscribe from this group and stop receiving emails from it, send an email to annex_wifi_rd...@googlegroups.com.
To view this discussion on the web, visit https://groups.google.com/d/msgid/annex_wifi_rds/3e62cb83-9616-4544-8340-a168fede3dd3n%40googlegroups.com.