Goal: Simulate the reactions of a nervous / lonely puppy using servo's + the mbed LPC1768.
Dependencies: mbed-rtos-edited mbed Servo C12832
Diff: nervousPuppy.h
- Revision:
- 0:f71b200c2f4d
- Child:
- 1:8fe6802d6971
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/nervousPuppy.h Mon Jan 12 19:05:08 2015 +0000 @@ -0,0 +1,26 @@ +#include "mbed.h" +#include <iostream> + +#define Cos(a) cos(PI/180*(a)) +#define Sin(a) sin(PI/180*(a)) +#define PI 3.1415926 + +using namespace std; + +static const float LONELY = 5.0f; +static const float SCARED = 0.5f; + +class nervousPuppy{ + public: + nervousPuppy(); + + bool isLonely(); + bool isScared(); + + float getPlayerDistance(); + void setPlayerDistance(); + + private: + float playerDistance; + +}; \ No newline at end of file