IOT: EPA UV Index Feed

By Dan Chen, August 17, 2020

How it works

The ATWINC1500 pulls the data from a server that pre-parse EPA’s XML file, link below

(Change the ZIP/***** to your zip code)
https://enviro.epa.gov/enviro/efservice/getEnvirofactsUVHOURLY/ZIP/98121

The PHP file that I included below, phrases the XML file and added a few things, such as current time and current UV index at the very end and it looks like this

?08AM 9AM:2 10AM:4 11AM:5 12PM:7 1PM:7 2PM:7 3PM:6 4PM:4 5PM:2 6PM:1 0

Adafruit MO then process the string and map that to the NeoPixel color via the char below.

You will need

Adafruit Feather M0 WiFi – ATSAMD21 + ATWINC1500

350 Mah Lipo

One NeoPixel

Slider Switch
https://www.digikey.com/product-detail/en/c-k/JS202011SCQN/401-2002-1-ND/1640098

The switch is wired to the GND and END pin