Simply creates a servo object from a motor object, to allow the control of the angle. uses the solar panel to look for the brightest spot, then stops.
Dependencies: mbed
Fork of Lab6_Basic by
Diff: Servo.h
- Revision:
- 2:3540e1f2f0e1
- Parent:
- 1:aa0b85d0961c
- Child:
- 3:b787aa49b900
diff -r aa0b85d0961c -r 3540e1f2f0e1 Servo.h --- a/Servo.h Wed Aug 17 19:16:04 2016 +0000 +++ b/Servo.h Wed Aug 17 19:21:43 2016 +0000 @@ -24,13 +24,13 @@ public: /** Create a servo object. * - * @param pin AnalogIn pin to be feedback + * @param pin AnalogIn pin to be feedback, motor is a Motor object from Motor.h */ Servo(PinName pin,Motor motor); - /** Set the servo position, normalised to it's full range + /** Set the servo position * - * @param percent an angle number in degrees 0-180 to represent the full range. + * @param angle intger in degrees 0-180 to represent the full range. */ void write(float percent);