Abstraction for the glider class
Diff: Glider.h
- Revision:
- 11:5e83ff964f5f
- Parent:
- 10:4c4f0ea887a4
- Child:
- 12:ca3e1c6203f7
--- a/Glider.h Mon Apr 24 21:34:11 2017 +0000 +++ b/Glider.h Tue Apr 25 17:18:44 2017 +0000 @@ -6,6 +6,7 @@ #include "math.h" #include "HMC5883L.h" #include "BMP180.h" +#include "beep.h" #define SAVE_DATA_FORMAT "%d %d %d" #define CMD_BUZZER 'b' @@ -20,6 +21,8 @@ #define AIR_DENSITY 1.225 //kg per m3 +#define BUZZER_FREQ 700.0 + class Glider { public: Serial* dev; @@ -40,6 +43,7 @@ Glider(Serial* device, PinName sda, PinName scl, PinName tx, PinName rx); InterruptIn xbeeRxInt; AnalogIn pitot; + Beep buzzer; void setHeading(); void setTempPressAlt(); void setAirSpeed(); @@ -51,6 +55,7 @@ void transmitPacket(); void setCommandFlag(); void processCommand(); + void soundBuzzer(float freq, float dur, bool infinate); }; #endif