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
- Committer:
- WAT34
- Date:
- 2015-05-17
- Revision:
- 0:1f3576ebcecb
File content as of revision 0:1f3576ebcecb:
#include "mbed.h" #include "QEI.h" QEI loli(p21,p22,NC,621); Serial pc(USBTX,USBRX); int main() { int pulse; while(1){ pulse = loli.getPulses()/2; if (pulse >=360){ pulse -= 360; } if (pulse <= -360){ pulse += 360; } pc.printf("%d\n\r",pulse); } }