Regenerating PPM signal based on distances from ultrasonic sensors, ESP8266 for connectin via wifi. Autonomous quadcopter behaviour, autonomou height holding. Flying direction based on front and back ultrasonic sensors.

Dependencies:   ConfigFile HCSR04 PID PPM2 mbed-rtos mbed

Branch:
DistanceRegulation
Revision:
36:ed8b7b7b6cfa
Parent:
34:5dca557e982f
Child:
39:93d8aa47f4ce
--- a/main.cpp	Sat Mar 03 15:38:10 2018 +0000
+++ b/main.cpp	Sun Mar 04 15:17:38 2018 +0000
@@ -27,7 +27,8 @@
     
     // INITIALIZE CLASSES
     _ppmRegen = new PpmRegen(_interruptPort);
-    _groundDistance = new PID(0, 0, 0, 0.005);
+    float rate = (1.0 / FLIGHT_CONTROLLER_FREQUENCY);
+    _groundDistance = new PID(0, 0, 0, rate);
     
     //setup PID
     loadConfigFile();