lew247
 Guru
 Joined: 23/12/2015 Location: United KingdomPosts: 1702 |
Posted: 07:25am 30 Dec 2015 |
Copy link to clipboard |
 Print this post |
|
I've just found this page and its given me some great ideas
I've just sent off for a MicroMite+ Explore 64 moduule
and a 2 character lcd display and also a 2.4 inch glcd and a 7 inch glcd both with touchscreen, gps module and a few other things.
My intention was to make a clock with analogue hands drawn onto the glcd, but I've also decided I want the weather on there
I may go with the analogue clock, or I might go for digital time on the glcd.
I'll get the current day, date time etc from a gps module, and I'll get the indoor temp from a ds18b20
What I'd like to get is the following showing on the glcd
The bit I'm interested in is - THIS:
"weather":"Partly Cloudy"
"temp_c":8.5 °C
"wind_dir":"WSW"
"wind_degrees":240, (Maybe put into a arrow facing that direction)
"wind_mph":2.9
"wind_gust_mph":"4.9
"windchill_c":"8"
"feelslike_c":"8",
"visibility_mi":"6.2"
"precip_today_metric":"4
"icon":"partlycloudy" - (This will be a bmp from an sd card)
Those are the current figures from the wunderground api at the moment.
The full section of the api is got from here
http://api.wunderground.com/api/6865d2e101980329/geolookup/conditions/q/UK/Denton.json
All from
},
"station_id":"IDUKINFI2",
"observation_time":"Last Updated on December 30, 5:03 PM GMT",
"observation_time_rfc822":"Wed, 30 Dec 2015 17:03:39 +0000",
"observation_epoch":"1451495019",
"local_time_rfc822":"Wed, 30 Dec 2015 17:03:54 +0000",
"local_epoch":"1451495034",
"local_tz_short":"GMT",
"local_tz_long":"Europe/London",
"local_tz_offset":"+0000",
"weather":"Partly Cloudy",
"temperature_string":"47.3 F (8.5 C)",
"temp_f":47.3,
"temp_c":8.5,
"relative_humidity":"88%",
"wind_string":"From the WSW at 2.9 MPH Gusting to 4.9 MPH",
"wind_dir":"WSW",
"wind_degrees":240,
"wind_mph":2.9,
"wind_gust_mph":"4.9",
"wind_kph":4.7,
"wind_gust_kph":"7.9",
"pressure_mb":"1002",
"pressure_in":"29.59",
"pressure_trend":"-",
"dewpoint_string":"44 F (7 C)",
"dewpoint_f":44,
"dewpoint_c":7,
"heat_index_string":"NA",
"heat_index_f":"NA",
"heat_index_c":"NA",
"windchill_string":"47 F (8 C)",
"windchill_f":"47",
"windchill_c":"8",
"feelslike_string":"47 F (8 C)",
"feelslike_f":"47",
"feelslike_c":"8",
"visibility_mi":"6.2",
"visibility_km":"10.0",
"solarradiation":"0",
"UV":"0.0","precip_1hr_string":"0.00 in ( 0 mm)",
"precip_1hr_in":"0.00",
"precip_1hr_metric":" 0",
"precip_today_string":"0.15 in (4 mm)",
"precip_today_in":"0.15",
"precip_today_metric":"4",
"icon":"partlycloudy",
"icon_url":"http://icons.wxug.com/i/c/k/nt_partlycloudy.gif",
"forecast_url":"http://www.wunderground.com/global/stations/03334.html",
"history_url":"http://www.wunderground.com/weatherstation/WXDailyHistory.asp?ID=IDUKINFI2",
"ob_url":"http://www.wunderground.com/cgi-bin/findweather/getForecast?query=53.472458,-2.054598",
"nowcast":""
}
has anyone figured out how to get the relevant bits from the api? or is there an easy way just to get the bits I want and display them on the glcd?
The api code shown above is mine, but its ok as I have't received the micromite or lcd's yet and will be a few weeks before they all get here.
I'd like to figure out the programming before it arrvives, hence my asking questions now
When it's finished it may look "something like this one" Pic taken from here:http://www.thebackshed.com/forum/forum_posts.asp?TID=7725&PN=20&TPN=3
But I'll have cloud icons on an sd card that I'll be able to auto select depending on the current weather state outside.
and a few other things I haven't decided on yet.
Any help with ideas on how to pull out the selection with code wilbe gratefully received Edited by lew247 2015-12-31 |