Fixed Sonar
Dependencies: C12832 Servo mbed-rtos-edited mbed
Fork of NervousPuppy by
Diff: nervousPuppy.h
- Revision:
- 4:2b47356f4b7d
- Parent:
- 3:74dfce05dd99
- Child:
- 5:cbb5d7460309
--- a/nervousPuppy.h Wed Jan 14 16:57:41 2015 +0000 +++ b/nervousPuppy.h Thu Jan 15 17:01:47 2015 +0000 @@ -1,6 +1,7 @@ #include "mbed.h" #include "rtos.h" #include "Servo.h" +#include "C12832.h" #include <math.h> #include <string> @@ -10,6 +11,7 @@ class nervousPuppy{ public: + nervousPuppy(); bool isLonely(); @@ -24,16 +26,14 @@ void changePosition(string servo,float angle); private: - //Servo tilt(); - //Servo rotate(); Mutex lockForDistance; //Not sure why needed float playerDistance, playerError; bool scared, lonely; - const float LONELY = 10.0f; //Placeholder number - const float SCARED = 3.0f; //Placeholder number + const float LONELY = 0.10f; //Placeholder number + const float SCARED = 0.088f; //Placeholder number const float RADIUS = 2.0f; //Placeholder number - const float SHUTDOWN = 1.0f; //Placeholder number + const float SHUTDOWN = 0.0f; //Placeholder number const float PULSE_RATE = 10; //Placeholder number - Pulses per second const float SERVO_TILT_LIMIT = 45; //Placeholder number - max angle servo can tilt by const float SERVO_ROTATE_LIMIT = 45; //Placeholder number - max angle servo can rotate by