Auroras, or northern lights, are amazing: a beautiful display of ionization in the disturbed magnetosphere. Auroras often happen in the dark of the night and their occurrence is random. The best predictions usually only provide an hour’s notice. To make sure I can get to see the latest Canadian auroras, I made a Raspberry Pi Aurora Alarm.
There is a simple way of determining if there is an Aurora in Canada, you can check the live AuroraWatch graph. There you will see a graph like this:
From that graph you can see that the Aurora on September 1st, 2017 did not occur until about 11pm. And, even though I was asleep at the time, I was awaken to see the aurora!
My setup is very simple. I have a Raspberry Pi that probes the Aurora with a simple Python function:
import requests
from bs4 import BeautifulSoup def percent_aurora_right_now(): r = requests.get('http://www.aurorawatch.ca/') soup = BeautifulSoup(r.text, 'html.parser') percent_aurora = 0 for span in soup.find_all('span'): if '%' == span.text[-1]: try: percent_aurora = float(span.text.replace('%', '')) except: pass return percent_aurora
Reference shelf
A short shelf of sources and related reading. Opens in a new tab.