df

Dependencies:   mbed

Revision:
2:6f9c364ebe40
Parent:
1:6a420a141411
--- a/main.cpp	Tue Jun 30 23:55:34 2015 +0000
+++ b/main.cpp	Wed Jul 01 02:35:56 2015 +0000
@@ -2,8 +2,16 @@
 #include "Encoder.h"
 int main() {
     Encoder angEncoder(p5, p6, p7, p21);
-    angEncoder.read()
-    //DigitalOut led1(LED1);
+    Serial pc(USBTX, USBRX);   
+    DigitalOut led1(LED1);  
+    led1 = 1; 
     
-    //led1 = 1;
+    //zero_ang = 1
+    angEncoder.init(0);                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     angEncoder.init(0);
+    while(1){
+    int s = angEncoder.angle();
+    pc.printf("%f\n\r", s);
+    
+    }
+
     }
\ No newline at end of file