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:
26:11539036f0fb
Parent:
25:69190c222dbf
Child:
27:5956d5e3ff63
--- a/hardware.h	Sun Nov 26 17:27:39 2017 +0000
+++ b/hardware.h	Fri Dec 01 11:11:23 2017 +0000
@@ -14,16 +14,17 @@
 void ConvertToCharArray(float number);
 void ConvertToCharArray(int number);
 
-Serial pc(USBTX, USBRX); // tx, rx
-PID* _groundDistance;
-HCSR04* _sonic;
-PpmRegen* _ppmRegen;
+Serial          pc(USBTX, USBRX); // tx, rx
+PID*            _groundDistance;
+RtosTimer       *_groudRegulationUpdateTimer;
+HCSR04*         _sonic;
+PpmRegen*       _ppmRegen;
 
 ConfigFile _configFile;
 LocalFileSystem local("local");
 
 Thread serverThread;
-Thread distanceThread;
+Thread _distanceThread;
 
 InterruptIn*    _interruptPort =    new InterruptIn(p28);
 PwmOut*         _roll =             new PwmOut(p21);