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 ECE 111 At Oregon State University

Revision:
6:65dfd3886629
Parent:
3:b787aa49b900
diff -r 56bbef4099da -r 65dfd3886629 Servo.h
--- a/Servo.h	Fri Nov 18 03:59:01 2016 +0000
+++ b/Servo.h	Tue Nov 14 13:02:54 2017 -0800
@@ -3,7 +3,7 @@
 #include "SLCD.h"
 #ifndef MBED_SERVO_H
 #define MBED_SERVO_H
- 
+
 /** Servo control class, based on a Motor Class object
  *
  * Example:
@@ -13,39 +13,42 @@
  * #include "Servo.h"
  * Motor my_motor(P12,P13P,p11);
  * Servo my_servo(p21,my_motor);
- * 
+ *
  * int main() {
- *     
+ *
  * }
  * @endcode
  */
 class Servo {
- 
+
 public:
     /** Create a servo object.
      *
-     * @param pin AnalogIn pin to be feedback, motor is a Motor object from Motor.h  
+     * @param pin AnalogIn pin to be feedback, motor is a Motor object from Motor.h
      */
     Servo(PinName analog_input,PinName Positive, PinName Negative,PinName Speed);
-    
+
     /** Set the servo position
      *
      * @param angle intger in degrees 0-180 to represent the full range.
      */
     void set(int degree);
-    
+
     /**  Read the servo current position in degrees from 0-180
      *
-     * @return returns the current anlge of the servo   
-     */   
-    
+     * @return returns the current anlge of the servo
+     */
+
      void move(void);
+
+     void check();
+
+     unsigned int get();
+
      
-     void check();
 protected:
     AnalogIn _feedback;
     Motor    _motor;
 };
- 
+
 #endif
- 
\ No newline at end of file