A library used for controlling a quadcopter. It provides an easy to use interface, which allows to mount, calibrate and run motors. It is also able to calibrate the actual speed according to calculated PID roll & pitch difference. I used the original Servo library as ESC modules use the same PWM signal as Servo motors.

Dependents:   QuadcopterProgram

Revision:
7:5ab77c583ae3
Parent:
6:a6b8e508643d
Child:
9:22c52af13ac2
--- a/Quadcopter.h	Fri Feb 20 00:48:15 2015 +0000
+++ b/Quadcopter.h	Fri Feb 20 00:51:21 2015 +0000
@@ -11,11 +11,16 @@
 * Example:
 * @code
 * #include "mbed.h"
-*
+* #include "Quadcopter.h"
 * Quadcopter quad (p21, p22, p23, p24);   //intance of the Quadcopter class
 *
+* #define SAMPLE_NUM 50
+* #define MIN_CALIBRATE 0.3
+* #define MAX_CALIBRATE 1.0
+*
 * int main(){
-*  
+*   quad.calibrate (MIN_CALIBRATE, MAX_CALIBRATE, SAMPLE_NUM);
+*   
 *   float speed[4];
 *   for (int i = 0; i < 4; i++){    //initialise speed to be 0.2
 *       speed[i] = 0.2;