a simple library to control an animatronic head
Alex.h@1:c5edd3b18b79, 2010-12-15 (annotated)
- Committer:
- mxjac
- Date:
- Wed Dec 15 15:07:10 2010 +0000
- Revision:
- 1:c5edd3b18b79
- Parent:
- 0:8474cbec06bd
- Child:
- 2:3920d79c79b1
Presence too far function
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
mxjac | 0:8474cbec06bd | 1 | #include "mbed.h" |
mxjac | 0:8474cbec06bd | 2 | #include "SRF05.h" |
mxjac | 0:8474cbec06bd | 3 | #include "Servo.h" |
mxjac | 0:8474cbec06bd | 4 | |
mxjac | 0:8474cbec06bd | 5 | class Alex |
mxjac | 0:8474cbec06bd | 6 | { |
mxjac | 0:8474cbec06bd | 7 | public: |
mxjac | 0:8474cbec06bd | 8 | Alex(SRF05, Servo, Servo, Servo, Servo);// build a head object, comprised of a sensor and 4 servos |
mxjac | 0:8474cbec06bd | 9 | ~Alex(); |
mxjac | 0:8474cbec06bd | 10 | void TestHead(); |
mxjac | 0:8474cbec06bd | 11 | int Testpresence(); |
mxjac | 0:8474cbec06bd | 12 | void Move_eyes(int); |
mxjac | 0:8474cbec06bd | 13 | void Move_mouth(int); |
mxjac | 0:8474cbec06bd | 14 | void Move_leaning(int); |
mxjac | 0:8474cbec06bd | 15 | void Move_rotation(int); |
mxjac | 1:c5edd3b18b79 | 16 | void Simulate_Talking(int); |
mxjac | 1:c5edd3b18b79 | 17 | void Presence_too_far(); |
mxjac | 0:8474cbec06bd | 18 | private: |
mxjac | 0:8474cbec06bd | 19 | SRF05 S; |
mxjac | 0:8474cbec06bd | 20 | Servo E, M, L, R; |
mxjac | 1:c5edd3b18b79 | 21 | PwmOut Led; |
mxjac | 1:c5edd3b18b79 | 22 | Serial pc; |
mxjac | 0:8474cbec06bd | 23 | }; |