Skip to content

jefforulez/quakeolantern

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Quake-o'-Lantern

Hack-o'-Lantern '16

quakeolantern

Vibrate a miniture pumpkin whenever there's an earthquake somewhere in the world.

Movement lasts two seconds for each order of magnitude of the earthquake by default, e.g. M2 lasts four seconds and M4 lasts eight seconds.

Requirements

Setup

Wiring

See http://razzpisampler.oreilly.com/ch05.html#FIG7.15

Software

virtualenv venv
source venv/bin/activate
pip install -r requirements.txt

Pumpkin

  • Cut a hole in the bottom of the pumpkin that fits the body of the servo
  • Scoop out all the meat
  • Place some folder tissue inside the pumpkin to serve as padding for the servo
  • Slide the servo into the pumpkin so that the horn is on the outside
    • Note: A wheel horn seems to work best, but any one should do

Run

Using defaults:

python ./quakeolantern.py

Overriding with environment variables:

QOL_USGS_ATOM_URL="https://earthquake.usgs.gov/earthquakes/feed/v1.0/summary/significant_hour.atom" \
QOL_USGS_CHECK_INTERVAL=240 \
QOL_SERVO_PIN=17 \
python ./quakeolantern.py

Environment Variables

QOL_SECONDS_PER_MAGNITUDE
number of seconds to shake per magnitude, default: 2
QOL_SERVO_PIN
gpio pin for controlling the servo, default: 18
QOL_USGS_ATOM_URL
default: https://earthquake.usgs.gov/earthquakes/feed/v1.0/summary/all_hour.atom
QOL_USGS_CHECK_INTERVAL
interval in seconds to check for new eartquakes, default: 60

References

Releases

No releases published

Packages

No packages published

Languages