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:
- glintligo
- Date:
- 2018-04-30
- Revision:
- 0:e63858fec119
- Child:
- 1:1e3eb2d1496b
File content as of revision 0:e63858fec119:
#include "mbed.h" #include "QEI.h" Serial pc(PA_2, PA_3); PwmOut mypwm1(PB_7); PwmOut mypwm2(PB_6); QEI wheel(PB_10, PB_11, NC, 11, QEI::X4_ENCODING); int x; int main() { mypwm1.period_ms(2); mypwm2.period_ms(2); mypwm1.pulsewidth(0.001); mypwm2.pulsewidth(0.001); while(1) { wait(0.1); x = wheel.getPulses(); pc.printf("Pulses is: %i\n", x); } }