Quadrocopter control with selfmade smartphone app
A usual Android ™ smartphone includes all necessary technology to use it as a remote control for a quadrocopter.
- Accelerometer and magnetometer to measure the attitude
- Touch sensitive display
The app does only have 300 lines of code without any optimizing. For attitude angle measuring the important methods are SensorManager.getRotationMatrix and SensorManager.getOrientation. With these information the pitch and roll input can be controlled. The position of a finger on the touch display can be determined with the method onTouchEvent(MotionEvent event). This is used to control yaw and thrust.
That’s all to control the QC. But most QC flight controls need some special stick position to arm their motors. For this a button or something similar is needed. If this button is pressed, the special stick positions are send for a couple of seconds to arm the motors. After that the control of the QC is as desribed.