EPA UV Index Feed / IOT

1,350

7

Introduction: EPA UV Index Feed / IOT

This little device pulls your local UV index from EPA and display the UV level in 5 different colors and also displays details on the OLED. UV 1-2 is Green, 3-5 is Yellow, 6-7 is Orange, 8-10 is Red, 11+ is purple.

Supplies

Adafruit Feather M0 WiFi – ATSAMD21 + ATWINC1500

350 Mah Lipo

One NeoPixel

A server that can run php script with a Internet connection

3D printed parts (attached)

Step 1: Wiring

You will need to wire the NeoPixel to Adafruit Feather M0 WiFi – ATSAMD21 + ATWINC1500

it is used to display the UV color coding at the top. You will also need t wire the slider switch to the GND and enable pin.

I use slider switch from here

https://www.digikey.com/product-detail/en/c-k/JS20...

Step 2: Setup Server / Grab EPA Feeds

https://danchen.me/lab/wp-content/uploads/2020/08/pub_UV_index_checker_via_WiFiWebClient_OLED_neopixel.zip

The zip file contains uv.php file, it pulls the xml from the EPA site

(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.

Step 3: Print the Case

Print the 3D printing files

Step 4: Assemble

  1. Making sure you wire the NeoPixel to the correct PIN, I used 12 in the included code.
  2. Edit the WiFI SSID and Password.
  3. Upload the provide sketch.
  4. Pop in the display and lips
  5. Done!

Be the First to Share

    Recommendations

    • Make it Fly Challenge

      Make it Fly Challenge
    • Backyard Contest

      Backyard Contest
    • Summer Fun: Student Design Challenge

      Summer Fun: Student Design Challenge

    Comments