Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
main.cpp
00001 #include "mbed.h" 00002 #include "QEI.h" 00003 00004 QEI encoder( D5, D6, NC, 1000, QEI::X2_ENCODING); 00005 00006 Serial pc(USBTX,USBRX); 00007 00008 int pulse; 00009 int rev; 00010 00011 int main() 00012 { 00013 pc.baud(115200); 00014 00015 while(1) 00016 { 00017 pulse = encoder.getPulses(); 00018 rev = encoder.getRevolutions(); 00019 pc.printf("%d Pulses\t\t%d Putaran\n", pulse, rev); 00020 } 00021 }
Generated on Thu Jul 14 2022 21:26:57 by
1.7.2