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

hardware.h

Committer:
edy05
Date:
2017-10-26
Revision:
2:d172c9963f87
Child:
8:b5128641d4cf

File content as of revision 2:d172c9963f87:

#ifndef HARDWARE
#define HARDWARE

#include "mbed.h"
#include "PpmRegen.h"
#include "PID.h"
#include "hcsr04.h"

Serial pc(USBTX, USBRX); // tx, rx

Thread serverThread;
Thread distanceThread;

InterruptIn*    _interruptPort =    new InterruptIn(p28);
PwmOut*         _roll =             new PwmOut(p21);
PwmOut*         _pitch =            new PwmOut(p22);
PwmOut*         _throttle =         new PwmOut(p23);
PwmOut*         _yaw =              new PwmOut(p24);
PwmOut*         _aux1 =             new PwmOut(p25);
PwmOut*         _aux2 =             new PwmOut(p26);
PpmRegen* _ppmRegen;

PID* _groundDistance;

HCSR04* _sonic;


#endif