3 Simple Ways to
Share What You Make

With Instructables you can share what you make with the world — and tap into an ever-growing community of creative experts.

PhotosPhotos

Share one or more photos of a project, recipe, or whatever you've made, quickly and easily.

Step by StepStep-By-Step

Share your step-by-step photos with text instructions of what you made so others can do it too!

VideoVideo

Share your how-to video. You'll need your embed code from a video site such as YouTube.

The Seismic Reflector

Step 2The Software

The Software
The Software component of this project is written in Processing.  I'm not a pro-coder so I welcome comments on how this could be done better or more efficiently. 

The role of this software is to check the USGS 1day Earthquake RSS feed and trigger an event if a new entry is added to the list.  Right now the app checks the feed every 30 seconds which I think is probably a bit too often, but you can modify that if needed.

If a new event is added to the Feed and the app finds this, it sends a packet to the hardware containing the magnitude of the earthquake.  The hardware takes over at this point and knows how to respond to different strengths.  The app also has the ability to play an audible alert (which I've set to be an WW2 air raid siren)  when a new earthquake is posted.

A row of buttons at the bottom of the application allows for a certain degree of configuration and testing, but it's not exactly a complex interface.

It would be great if I could get the processing app to sit in the system tray on a PC, perhaps someone knows how to do that.  I know you can get Third party apps that minimise other applications to the tray, but that seems like cheating.  It's also a good size to be a Vista or Win7 widget, so if anyone wants to take the code and run with it, be my guest!

The attached zip file is the latest version of the code.  The connect button does not show the correct behaviour yet, although it should work (as long as you've changed the COM port to reflect what is used in your set-up).  This release of the software also includes the Air Raid siren which I downloaded from the very excellent Freesound.org (link to sample is here).  Future releases won't have this sample included in the zip due to the file size, so grab it while it's hot!

There are doubtless a few bugs in this code, I've not tested it too well, but If you have problems with it, then leave a comment and I'll do my best to respond.  I want to give a shout out to Bruno Nadeau, the author of the RomeFeeder Lib for Processing (link) who helped me get the USGS feed working. Please check Bruno's site for the latest versions of the library. (you will need this to compile the app)


« Previous StepDownload PDFView All StepsNext Step »
1 comment
Nov 19, 2009. 12:54 PMIstarian says:
It would be easier if you provided the necessary libraries with the program sources. Also, if you could make a way to set the preferences for the serial port,etc within the program you could export this as a java application (you'd need to do it three times though, once for mac windows and linux).

Pro

Get More Out of Instructables

Already have an Account?

close

All Steps Viewing
View all steps of an Instructable on the same page when you're a Pro Member.

Upgrade to Pro today!
14
Followers
3
Author:jimthree(jimblackhurst.com)
@jimthree