Giter Club home page Giter Club logo

spaceweatherlamp's Introduction

SpaceWeatherLamp

Basic code for 3-LED lamp that reads in live data from the ACE Satellite and outputs it to the LEDs. LEDs can subsequently be manipulated to produce a more visually appealing lamp.

This project reads in three basic pieces of information from the NOAA live feed of the ACE satellite:

  • Bulk speed
  • Temperature
  • Proton density

Bulk speed and temperature are represented by an RGB color range from blue to red in rainbow order. Proton density is represented by the speed of rainbow cycling. However, the proton density multiplier is included in the code in case the user would prefer to avoid the rainbow cycling. In that case, just implement the proton density calls similarly to how the bulk speed and temperature calls are implemented.

This project uses:

  1. An Adafruit Feather HUZZAH ESP8266. (Should be able to work with any ESP8266 with the right drivers.)
  2. Three diffused 10mm RGB LEDs. (Again, any RGB LEDs should work.)
  3. All the necessary wires.
  4. All the necessary resistors, depending on what LEDs you're using.

IMPORTANT: When using this code, please be sure to change the wifi network name and password in order to correspond to your own wifi network and password.

PLEASE DO NOT CHANGE THE REQUEST FREQUENCY. The .txt file only updates every 60 seconds anyways, and if you request too often the NOAA will get mad.

AQILamp (Added 2020)

I've added some extremely similar code for an AQI lamp. This reads exclusively AQI for your city. This code works primarily for an AQI between 0 and 300. Anything beyond 300 will appear as a pure red light. The color ratios are determined by the AQI on a sliding scale blue (AQI 0) -> green -> yellow -> red (AQI 300). During the fires, my light has primarily been shades of orange and red.

This project uses:

  1. An Adafruit Feather HUZZAH ESP8266. (Should be able to work with any ESP8266 with the right drivers.)
  2. One diffused 10mm RGB LED. (Again, any RGB LEDs should work.)
  3. All the necessary wires.
  4. All the necessary resistors, depending on what LEDs you're using.

IMPORTANT: When using this code, please be sure to change the wifi network name and password in order to correspond to your own wifi network and password. You will also need to go here: https://aqicn.org/data-platform/token/ and request your own token. Then put your token in for the 'token' variable.

Finally, enter your city for the 'city' variable. Not all cities are available by name alone, so make sure to check the API.

Feel free to change the request frequency to anything up to 1000req/second. It currently queries once per minute. However, there isn't much of a point to changing it to more than once per minute-- the AQI doesn't change that quickly, and the AQI detection stations don't update that quickly either.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.