I'm trying to control video playback with some wii nunchuks but am having problems controlling the data streams from the accelerometers.
I want to measure the overall change in the accelerometer to control the speed of the video. In other words, the faster the viewer moves their hands, the faster the video will play.
The acc. data goes from 0.0 to 1.0 but the problem is that it is at 0.5 at a rest state (no movement). If the viewer waves their arms around (for example), the data will shoot up and down (above and below 0.5). Does anyone know a good way to harness that overall change and channel it into a data stream from 0.0 (no movement) to 1.0 (most movement)?
In this way it wouldn't matter if the movement was up/down/left/right, as any movement would be registered as a displacement and could be used to speed up the video.
Here is the rough and ready patch i've been working on using OSCulator to get the wiimote data (jitter not connected). Ideally I would combine multiple data streams from different accelerometers and use the overall movement from the average of them all.