KRAI 2017 / Mbed 2 deprecated __coba_encoder__

Dependencies:   Motor mbed millis

Fork of DagonFly__RoadToJapan_15Mei_Ultimate by KRAI 2017

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers main.cpp Source File

main.cpp

00001 #include "mbed.h"
00002 #include "encoderKRAI.h"
00003 #include "Motor.h"
00004 #include "millis.h"
00005  
00006 encoderKRAI encLauncherDpn( D2, D3, 28, encoderKRAI::X4_ENCODING);
00007 //encoderKRAI encLauncherBlk( PC_12, PD_2, 28, encoderKRAI::X4_ENCODING);
00008 Serial pc(USBTX,USBRX);
00009 
00010 
00011 
00012 int main() {
00013     
00014 pc.baud(115200); 
00015 //wait_ms(10000); 
00016 startMillis();
00017 pc.printf("Hello World\n");
00018     
00019     while(1) {
00020         
00021         pc.printf("%d\n", encLauncherDpn.getPulses());
00022         wait_ms(100);
00023     }
00024 }