Library for googly eyes

Dependents:   Eyes_Demo

Revision:
2:9dd81fc2623f
Parent:
1:0791bb5735b4
diff -r 0791bb5735b4 -r 9dd81fc2623f Eyes.h
--- a/Eyes.h	Tue Dec 15 00:42:09 2015 +0000
+++ b/Eyes.h	Tue Apr 12 02:30:40 2016 +0000
@@ -21,7 +21,7 @@
     enum EXPRESSION{NORMAL, SUPRISED, SCARED, ANGRY}; 
     enum DIRECTION{U = 270, D = 90, L = 0, R = 180, C, 
                    UL= 315, UR= 225,DL= 45, DR = 135};
-    enum GESTURE{BLINK, CLOSE};
+    enum GESTURE{BLINK, CLOSE, SHAKE};
     typedef struct{int x; int y;}Coord_t;
     
     /*
@@ -36,6 +36,16 @@
     void look(DIRECTION direction);
     
     /*
+        Change the distance and direction the eyes look.
+        @param theta    The angle to look in degrees
+        @param dist     The normalized distance to look in given theta, i.e
+                        0 keeps eyes centered and 1 looks fully in given theta
+                        in between values give make eyes look more or less in 
+                        theta.
+    */
+    void look_there(int theta, float dist);
+    
+    /*
         Display a gesture. 
         
         BLINK is random ~100 to ~400ms. For user defined blink duration