On Fri, Feb 24, 2006 at 01:35:06PM -0000, Alan B. Pearce wrote: > >Well to be exact I'm planning to use a 3-axis acellerometer, > > http://www.sparkfun.com/commerce/product_info.php?products_id=252, > >as my tilt sensor. So I know that it's only referencing > >to gravity, therefore already it's ignoring any movement > >parallel to gravity, such as spin. > > Except it will not ignore gravity. Gravity will appear as a constant offset > in the Z direction for which axis of the accelerometer is measuring that > direction. Well what I'm saying is that by soley measuring tilts relative to gravity, there is no way to detect if the device is being spun. If my x and y are reading 0, and z is reading +1G, I know I am oriented upright. But the device could very well be spinning with x and y centered on the axis of rotation and therefore experiencing no centrifugal force. I haven't put much detailed thought into exactly how the math will work yet, but my thoughts are that I'll measure tilt by looking at the relative porportions between x, y and z. So any movement will "look" like gravity to the math, even if the sum total of the vector is higher than 1G. So someone moving the cube side to side will cause the image to sway back and forth as the force exerted on the cube moves from side to side. > >My guess is that any vigourous movement will cause a lot > >of weird stuff to display from the non-gravity accellerations > >present. But the display should get more stable as movement > >stops, because I'll always be directly referencing gravity > >to decide what to display. > > I would be tempted to blank the whole display if you sense any "high > frequency" movement on any axis, as a 'negative reward' for this behaviour. Nah, I was just at a whole art exhibition put on by some quiet famous artists exploiting various "glitches" in computer games. Let people have their fun by messing up the inputs, it's only temporary anyway. -- pete@petertodd.ca http://www.petertodd.ca -- http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist