Accelerometer axes' orientation for gesture recognition(left, right, up, down)

I want to access accelerometer (axis)data for my game. If the player moves the sensor/device to left(-x) an object on the screen moves to the left, if device/sensor is moved to the right(+x) then object moves to the right. Similar behavior for up(+y) and down(-y). But am unable to find the correct device/sensor orientation for axes. Any help will be appreciated.


  • Use the sample app to see a real-time graph of measured acceleration on the xyz axes and move the board up/down & left/right to see which axis responds to what motion.  These values depend on the sensor orientation which differ among the boards.
This discussion has been closed.