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: Motor mbed millis
Revision 1:3a234ff1442b, committed 2017-02-16
- Comitter:
- Najib_irvani
- Date:
- Thu Feb 16 16:25:31 2017 +0000
- Parent:
- 0:be14d75c8037
- Commit message:
- fungsi transfer motor dengan input fungsi step
Changed in this revision
main.cpp | Show annotated file Show diff for this revision Revisions of this file |
--- a/main.cpp Thu Feb 16 16:24:30 2017 +0000 +++ b/main.cpp Thu Feb 16 16:25:31 2017 +0000 @@ -3,7 +3,7 @@ #include "Motor.h" #include "millis.h" -encoderKRAI encoder( PB_13, PB_14, 14, encoderKRAI::X2_ENCODING); +encoderKRAI encoder( PB_13, PB_14, 14, encoderKRAI::X4_ENCODING); Serial pc(USBTX,USBRX); Motor motor(PA_8,PC_1,PC_2); @@ -23,7 +23,7 @@ currentMillis = millis(); - if (currentMillis-previousMillis>=100) + if (currentMillis-previousMillis>=10) { rpm = (double)encoder.getPulses();