This project uses micropython and an ESP 82366 to check the AQI at a regular interval and adjusts the color of a series of LEDS. The project is fit inside a selenite crystal lamp because it diffuses the colors and looks really cool.
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
AQI_Crystal.gif
LICENSE
boot.py
main.py
readme.md

readme.md

Air Quality Index Crystal

gif

About

For the past week smoke and particulate matter from the Camp Fire in Northern California has lingered in San Francisco, creating a hazardous environment. The EPA ranks the air quality with the Air Quality Index, a value that ranges from 0 - 500. San Francisco often stays in the 'good' range of 0-50, but recently was in the 'very-unhealthy' range. School and businesses have been canceling activities and government officials are encouraging residents to shelter indoors and wear a NIOSH N95 mask when outdoors.

As we increasingly deal with the impact of global climate change it seemed appropriate to create a visualization of the AQI, so I can determine if I need to wear a mask before heading outdoors. Fortunately, the EPA has an API for checking the current AQI by zipcode at airnowapi.org. Additionally, the EPA has assigned colors for the different ranges and provides specific hexidecimal color codes for each.

This project checks the AQI at a regular interval and adjusts the color of a series of LEDS. The project is fit inside a selenite crystal lamp because it diffuses the colors and looks really cool.

Why Micropython and not Circuit Python?

I explored Circuit Python because I was interested in using the Adafruit Fancy Led library, but ultimately Circuit Python lacked a urequests alternative.

Materials

Assembly

  1. Solder wires to NeoPixel Ring
  2. Solder wires to Feather HUZZAH
  • Connect ground to ground, 3v to 3v, and Data in to Pin 14
  1. Slide into the Selenite Crystal

Setup and Configuration

  1. Download and install micropython on the Feather HUZZAH
  2. Download or Clone this repository
  3. Open boot.py and add your SSID and SSID_PW
  4. Request API Access at airnowapi.org
  • Copy your top secret API KEY
  1. Open main.py and add your API_KEY and ZIP_CODE as a string
  2. [Load the code onto the Feather HUZZAH] (https://learn.adafruit.com/micropython-basics-load-files-and-run-code/overview)

Resources

  1. airnowapi.org
  2. video trailer on Vimeo