encoder

Dependencies:   mbed

Revision:
2:92fd61600fa8
Parent:
0:4d7336a951bd
--- a/encoder.cpp	Wed Oct 27 05:18:30 2021 +0000
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,18 +0,0 @@
-#include "mbed.h"
-#include "QEI.h"
-
-QEI encoder (A0,A1,NC,2500);
-DigitalOut dout(LED1);
-Serial pc(USBTX, USBRX);
-int counter = 0;
-int cur_state = 0;
-
-int main(void) {  
-        while(1){
-        counter = encoder.getPulses();
-        if( counter > cur_state){
-            cur_state = counter;
-            printf("%d ", cur_state);
-            }
-        }
-}
\ No newline at end of file