[Game]cPong [WIP]

https://www.dfrobot.com/wiki/index.php/How_to_Use_a_Three-Axis_Accelerometer_for_Tilt_Sensing

Did you see this site?

3-axis accelerometers are on my ‘to learn’ list so it’ll be interesting to see the result.

Seeing Euler angles makes me wonder if gimbal lock is going to be a problem.
We don’t want another Apollo 11 incident :P.

just read values from one of the axis and use that for moving the ball. You might need to use average of several values if the sensor has noise.

Thinking about cPong, I would rotate the Pokitto like a steering wheel to control the paddle. And would make the paddle bigger as the sensor control is not so accurate as the d-pad control.

If you figured things out and would like to mess with it I published the source on mbed.
https://os.mbed.com/users/trelemar/code/cPong/

The movement code is at line # 318 in cpong.cpp

It’s a mess and kind of a first trial game but yeah :slight_smile: