Hack-o'-Lantern '16
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.
- Raspberry Pi with Internet connectivity
- Micro servo, e.g. Continuous Rotation Micro Servo - FS90R
- 6 volt power source, e.g. 4 x AA Battery Holder
- 1 x 1k ohm resistor
- 1 x Breadboard
- Various wires
See http://razzpisampler.oreilly.com/ch05.html#FIG7.15
virtualenv venv
source venv/bin/activate
pip install -r requirements.txt
- 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
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
- 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
- USGS ATOM Syndication https://earthquake.usgs.gov/earthquakes/feed/v1.0/atom.php
- Servo wiring based on http://razzpisampler.oreilly.com/ch05.html