Encoder

Dependencies:   QEI TextLCD mbed

Fork of Encoder1 by Federico Velasquez V

main.cpp

Committer:
fvelasquezv
Date:
2013-11-08
Revision:
1:7b43d1823567
Parent:
0:23ecb0de1978

File content as of revision 1:7b43d1823567:


#include "QEI.h"
#include "TextLCD.h"

TextLCD lcd(PTC10, PTC11, PTC12, PTC13, PTC16, PTC17); // rs, e, d4-d7TextLCD lcd(PTC10, PTC11, PTC12, PTC13, PTC16, PTC17); // rs, e, d4-d7
QEI leftQei(PTD6, PTD7, NC, 624);
 
int main() {
        lcd.locate(0,0);
        lcd.printf("pulsos: ");
        
    while(1){
        lcd.locate(8,0);
        lcd.printf("     ");
        
        lcd.locate(8,0);
        lcd.printf("%i",leftQei.getPulses());
        wait(0.2);         
        
    }
 
}