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.
Dependencies: MotCon2 QEI USBDevice mbed
Revision 1:9ffb6825058f, committed 2018-01-11
- Comitter:
- jebradshaw
- Date:
- Thu Jan 11 19:39:34 2018 +0000
- Parent:
- 0:f429a7e2e92c
- Commit message:
- Teensy 3.2 motor, encoder, USB serial port test
Changed in this revision
main.cpp | Show annotated file Show diff for this revision Revisions of this file |
diff -r f429a7e2e92c -r 9ffb6825058f main.cpp --- a/main.cpp Thu Jan 11 18:34:37 2018 +0000 +++ b/main.cpp Thu Jan 11 19:39:34 2018 +0000 @@ -1,14 +1,17 @@ +// Tensy 3.2 QEI, USBSerial, MotCon example +// J. Bradshaw - 20180111 + #include "mbed.h" #include "USBSerial.h" #include "MotCon.h" #include "QEI.h" QEI enc1(D2,D3,NC,1024, QEI::X2_ENCODING); -MotCon mot(D4, D5); +MotCon mot(D4, D5); //pwm, dir USBSerial pc; Serial ser1(D1,D0); // tx, rx DigitalOut led1(LED1); -AnalogIn current(A0); +AnalogIn current(A0); int main() { wait(2.0);