I just finished the promised 2d Seismometer Dashboard widget that uses processing.js. It is based on the excellent, albeit simple, Seismometer widget from Matt Haynes and uses its Unimotion plugin library as well.
Somebody has been asking for a version that graphs all 3 axis in the comments, so here it is!
One could use 3 versions of that seismomenter widget, and choose a different axis for each one, but sadly it does not save the prefs, and so forgets that after a restart, resetting to all 3 graphing the same axis.
My widget is called P5Seismo (from processing’s early name P5) and comes in 3 flavors, without and with two different frame borders – a simple and a larger one.
It has a variety of useful options to control how the graphs looks and how the widget behaves.
- Line style: allows you to select how the 3 axis are graphed. You have the selection between 3 parallel lines, 2 parallel and one horizontal, as well as 2 crossing horizontal / vertical and one diagonal. Default: 3 cross.
- Flip: normally the lines come from the right/top but each individual line can be flipped with this option. Default: none.
- Colors: If selected the axis have different colors, x is red, y is green and z is blue. If turned off, they are all black. Default: On.
- Labels: Draws labels on the side of the graph (on the frame) naming the axis. Default: Off.
- Legend: Draws a legend in the lower left corner showing axis and their colors. Default: Off.
- show readings: shows the current axis’ reading in the legend as well. Default: Off.
- Pause hidden: pauses the widget, when it’s hidden; its useful to keep CPU load down when options are showing or dashboard is hidden. Default: On.
- Show FPS: displays current frames/s in the upper left corner, integrated over the last 10 frames. Default: On.
- Update frequency/fps: change redraw rate, left is smaller. Goes from 1 to 60, although the widget only reaches 60 when it’s smallest. Default: 24.
- Size: Size of the whole widget (relative to base size of background image). Goes from 0,5 at left to 1,5 at right. Default: 1.
- Local z-axis offset: Delta for the z-axis, needs to be adjusted to local gravity and type of sensor; newer ones seem to be more accurate than older ones. Moreover, some newer ones seem to have the orientation flipped; if you do not see a curve, set it to zero and check the reading. Then, set offset to (reading * -1). Absolute value should be around 1/g because the SMS is tare’d to zero gravity. Default: 1.