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: FastPWM HIDScope MODSERIAL QEI Matrix biquadFilter controller errorFetch mbed motorConfig refGen MatrixMath inverseKinematics
Fork of Minor_test_serial by
Revision 17:616ce7bc1f96, committed 2017-09-21
- Comitter:
- tvlogman
- Date:
- Thu Sep 21 11:53:09 2017 +0000
- Parent:
- 16:27430afe663e
- Child:
- 18:65e24db15c69
- Child:
- 19:f08b5cd2b7ce
- Commit message:
- Changed variable revs to represent driving shaft revs instead of motor revs
Changed in this revision
| main.cpp | Show annotated file Show diff for this revision Revisions of this file |
--- a/main.cpp Thu Sep 21 11:20:03 2017 +0000
+++ b/main.cpp Thu Sep 21 11:53:09 2017 +0000
@@ -28,18 +28,16 @@
volatile float x;
volatile float x_prev =0;
volatile float y; // filtered 'output' of ReadAnalogInAndFilter
-volatile float ledBrightness = 0.00;
-
+// Initializing encoder
Ticker encoderTicker;
volatile int counts = 0;
volatile float revs = 0.00;
-
-
void readEncoder(){
counts = Encoder.getPulses();
- revs = counts/64.0f;
+ revs = counts/(131*64.0f);
+ pc.printf("%0.2f revolutions \r\n", revs);
// Displaying revs in HIDscope
x = revs; // Capture data
