Fixed Sonar

Dependencies:   C12832 Servo mbed-rtos-edited mbed

Fork of NervousPuppy by Sean Doyle

nervousPuppy.h

Committer:
SeanDoyle
Date:
2015-01-12
Revision:
1:8fe6802d6971
Parent:
0:f71b200c2f4d
Child:
2:8415bea33a95

File content as of revision 1:8fe6802d6971:

#include "mbed.h"

#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(float dist);
                
    private:
        float playerDistance;

};