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: QEI RemoteIR mbed
Fork of encoder_v2 by
Diff: main.cpp
- Revision:
- 1:1b18e69bf50f
- Parent:
- 0:b9e03a03e580
- Child:
- 2:aa961ba3199e
--- a/main.cpp Wed Nov 08 01:17:49 2017 +0000
+++ b/main.cpp Wed Nov 08 01:38:27 2017 +0000
@@ -3,6 +3,7 @@
Serial pc (PA_2, PA_3); //serial comm enabled on pins pa_2 and pa_3
QEI encoder_Right(PB_3, PA_15, NC, 360, QEI::X4_ENCODING);
QEI encoder_Left(PA_1, PC_4, NC, 360, QEI::X4_ENCODING); //forward increases pulses
+PwmOut(m_Left, PC_7)
//QEI functions
/*
@@ -21,8 +22,11 @@
while(1) {
wait(0.1);
+ m_Left.write(0.75);
pc.printf("Pulses is: %i\n", encoder_Right.getPulses());
//pc.printf("Pulses is: %i\n", encoder_Left.getPulses());
}
+
+
}
\ No newline at end of file
