Runs out over WiFi or GSM to NOAA to grab forecast and current conditions weather reports. Displays Hi/Low/Current temperatures on 7-segment LED displays. Syncs to NTP servers and displays local time zone adjusted time in 12 or 24 hour format.
Designed to use (see tested integrations below)
For WiFi connections
- ATMEL SoC (System on Chip) ATSAMW25 ARM 32bit ultra low power WiFi equipped MCU's composed of three main blocks:
- in production examples
- Arduino MKR1000
- Adafruit Feather M0
- Integrated STMicroelectronics STM32F205 120Mhz 32bit ARM Cortex M3 microcontroller and Cypress BCM43362 Single-Chip IEEE 802.11TM b/g/n MAC/Baseband/Radio
- in production examples
Particle Photon
For LTE/GSM connections
- Integrated Atmel SAMD21 Cortex-M0+ 32bit low power (<20ma) ARM MCU and u-blox SARA-U2 series HSPA / GSM Module
- in production examples
Arduino MKR GSM 1400
- Combined STM32F205 120Mhz 32bit ARM Cortex M3 microcontroller U-Blox SARA U260/U270 for 3G GSM
- in production examples
Particle Electron
Written in C++ for the Arduino, Particle and Atmel Studio 7 ecosystems
https://www.arduino.cc
http://www.atmel.com/microsite/atmel-studio/
These projects are open source under the following Licenses
- documentation http://www.aviationweather.gov/dataserver
- syntax for METAR get with XML return http://www.aviationweather.gov/adds/dataserver_current/httpparam?dataSource=metars&requestType=retrieve&format=xml&stationString=KPDK&hoursBeforeNow=1
stationString
find station and coordinates[here] (https://forecast-v3.weather.gov/point/33.845,-84.3775) e.g. Peachtree Dekaulb, Atlanta, GA, USA (KPDK) Atlanta, GA 30305 shownhoursBeforeNow
limits age
- documentation https://forecast-v3.weather.gov/documentation
- HTTP get example parameters
https://api.weather.gov/points/33.8774,-84.3046/forecast
User-Agent: [email protected]/arduinowx01
Accept: application/ld+json
- documentation http://api.wunderground.com/weather/api
- example pulls conditions and forecast at airport Peachtree Dekaulb, Atlanta, GA, USA
http://api.wunderground.com/api/<KEY>/conditions/ forecast/q/PDK.json
<KEY>
required key see documentation to obtain and view pull limits
- Arduino MKR1000 for WiFi
- Adafruit Feather M0 WIFI
- IN PROCESS Particle Electron
- Adafruit HXD8357D 3.5" TFT 320x480 + Touchscreen Breakout Board w/MicroSD Socket for graphical weather display
- Adafruit HT16K33 I2C multiplexer-based 0.56" 4-Digit 7-Segment Display Red for high temperature
- Adafruit HT16K33 I2C multiplexer-based 0.56" 4-Digit 7-Segment Display Green for current temperature
- Adafruit HT16K33 I2C multiplexer-based 0.56" 4-Digit 7-Segment Display Blue for low temperature
- Adafruit HT16K33 I2C multiplexer-based 1.2" 4-Digit 7-Segment Display Yellow for time display
- Li-Po single cell, 3.7V, 700mAh minimum
-
console.cpp (or console.ino for Arduino IDE) code base for most functions.
-
/icons referenced weather icons as 58x58 bmp files
Public libraries
- WiFi101.h for integrated ATMEL ATSAMW25 wifi functions
- RTCZero.h for ATMEL SAMD21 time functions
- ArduinoHttpClient.h ATMEL ARM library used for HTTP (GET, POST, PUT, DELETE) web server requests and WebSocket servers message exchange.
- Returns parsed status code and Content-Length header (if present).
- Expects Client type object useable with any networking class
- Derived from Adrian McEwen's HttpClient library
- ArduinoJson.h Benoît Blanchon's library supports JSON serialization and deserialization.
- parse directly from an input
Stream
orstd::istream
- serial port
JsonObject& root = jsonBuffer.parse(Serial)
- Ethernet connection
JsonObject& root = jsonBuffer.parse(ethernetClient)
- Wifi connection
JsonObject& root = jsonBuffer.parse(wifiClient)
- parse directly from an input
- SimpleTimer.h for timer interrupts to make scheduled function calls - for weather gets
- Adafruit_HX8357.h for the spi HX8357 TFT screen low level functions
- Adafruit_LEDBackpack.h for the HX285 low level i2c 7-segment led functions
- Adafruit_GFX.h for universal display driver functions
- Fonts/FreeSans9pt7b.h font included with Adafruit-GFX-Library
- Fonts/FreeSans12pt7b.h font included with Adafruit-GFX-Library
Contributed libraries
- lib/convertTime.h timezone and 12/24 hr conversion
convertTime(24hour, TIME24, &hour, &AorP)
- 24hour as INT input hour in 24 hour format
- TIME24 as BOOL output type (y=24 hour, n= 12 hour)
- returns hour as INT output hour converted to 12 or 24 hour
- returns AorP as AM or PM (if 12 hour selected) 0 = AM, 1 = PM
- lib/dtostrf.h Convert float to string as avr-libc sprintf does not format floats
char *dtostrf (val, width, prec, char *sout)
- val double / float variable
- width string length returned INCLUDING decimal point + sign
- prec number of digits after the deimal point to print
- sout destination of output buffer (must be large enough)
- lib/WiFiCreds.h for credentials designating WiFi network SSID and password parameters, alter for your particulars
/*-----------------------------------------------------*
PRIVATE WIFI Credentials
for ATMEL series 32bit SAMD21 CPUs
© 2017 Bob Smith https://github.com/bethanysciences
MIT license
*------------------------------------------------------*/
char ssid[] = "iotworld"; // your network SSID (name)
char pass[] = "iotworld"; // your network password
- lib/wxConversions.h library of useful weather conversion functions
- Celc > Fahr
double c2f(double [temp °celcius])
returns temperature in °fahrenheit as double - Fahr > Celc
double f2c(double [temp °fahrenheit
returns temperature in °celcius - Humidity
double rh(double [dew point °celc], double [temp °celc])
returns % relative humidity as double - Windchill
float wc(double [temp °celcius], int [MPH windspeed])
returns windchill in °celcius as float - Convert Barometric Pressure as Pascals (PA) to Inches Mercury("HG)
double p2h(double pa)
- Dew Point in °Celsius or °Fahrenheit
double dp(double temp, int rh)
- temp = °Celsius or °Fahrenheit]
- rh = % relative humidity
- Calc Heat Index temperature °Celsius or °Fahrenheit
double hi(double temp, int rh, bool c)
- temp = °Celsius or °Fahrenheit
- rh = % relative humidity
- c = °Celsius yes/no
- returns heat index temperature °Celsius or °Fahrenheit as double
- Calc minutes to Min Erythemal Dose (MED) or sunburn
double med(int uvi, int alt, bool water, bool snow, int fitz, int spf)
- uvi = UV Index
- alt = altitude in meters
- water = on water y/n
- snow = on snow y/n
- fitz = Fitzpatrick skin type (0-32)
- spf = Sun Protection Factor value of applied sunblock
- returns minutes to Min Erythemal Dose (MED) sunburn as integer
- Celc > Fahr
- lib/xmlTakeParam.h Parse and extract elements from XML
string xmlTakeParam(String inStr, String needParam)
- inStr input string e.g.
<temp_c>30.6</temp_c>
- needParam parameter sought e.g.
temp_c
- returns value in string e.g.
30.6
- inStr input string e.g.