We closed this forum 18 June 2010. It has served us well since 2005 as the ALPHA forum did before it from 2002 to 2005. New discussions are ongoing at the new URL http://forum.processing.org. You'll need to sign up and get a new user account. We're sorry about that inconvenience, but we think it's better in the long run. The content on this forum will remain online.
Page Index Toggle Pages: 1
SMSlib (Read 1206 times)
SMSlib
Apr 10th, 2008, 6:00am
 
Guys,

I started playing with the Unimotion lib for my app, but couldnt figure out if it didnt know my model or wasnt calibrated right, since I got very strange readings.
So I decided to write another sms lib that uses the SMSlib from http://www.suitable.com/tools/smslib.html instead.
This library seems to know more models, has calibration data for all of them and provides a cool GUI for calibration (http://www.suitable.com/tools/seismacalibrate.html).
Instead of returning the readings as ints like Unimotion is returns floats in units of g.
The library can be found here: http://web.mac.com/derDoc/pub/SMSlib.zip.
As always, unpack to your processing/libraries/ folder.

Using SMSlib I built a sketch that graphs the readings of the sensor as histograms in 3d like this: http://web.mac.com/derDoc/pub/pic.png.
It also draws a histogram in 3d space connecting the points where the sensor values point to, fading the path over time as can be seen here: http://web.mac.com/derDoc/pub/pic2.png.
The source of the sketch is also there: http://web.mac.com/derDoc/pub/SMStest_sketch.zip.

Unfortunately, it seems that the Java security model of modern browsers inhibit them from being able to load 3rd-party/unsigned/potentially harmful libraries/executables from within an applet, so the sketch does not work in a browser. If anyone has a suggestion, I'm all ears.
Even without reading the sensor, the performance of the sketch in connection with browsers is sketchy at best, working only every other time and crashing the browser frequently.
The same goes for the dashboard - some OpenGL sketches work some of the time, mine in particular does not. I should try the P3D renderer.
And I actually wanted to build it into a dashboard widget - oh well. And come to think of it, in a widget I could even get around the security issue by using a widget plugin.

Suggestions welcome.
-Vitus
Page Index Toggle Pages: 1