View Single Post
Posts: 1,086 | Thanked: 2,964 times | Joined on Jan 2010
#9
Hey Maple, this is the second brainstorm of yours Im gonna answer by pointing to one of my tutorials in my signature.. but ya know

If you take a look at the PyGame tutorial in my sig, it explains how to use the N900 accelerometer and use it to trigger an action at a specific point. In my example, I used a hammer that made a "knock" sound as the n900 was lowered. This is a perfect starting point as it's reading from the same axis, only the hammer is going down and the "beer glass" would be going up. The example shows how to read in both directions

To create the beer drinking app, all you need to do is find the value of the accelerometer at the right slant and use that as the trigger point. My example also displays the accelerometer reading, so it's just a matter of moving it around until you're happy and jotting the value(s) down.

The only difficult bit would be getting the animation of a liquid moving or draining, which you would trigger at the required angle. if you can make that animation or find someone to do it for you, then you're home and dry
__________________
Follow me on my neglected twitter @kojacker

Cybot950 - Control a robot with your N9/N950
SMSPetFeeder - Build a Bluetooth/SMS dog feeder with Qt, N950, and arduino
Nerf950 - Use your N9/N950 to fire a Nerf gun
 

The Following User Says Thank You to kojacker For This Useful Post: