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.
Fork of L298 by
Revision 5:18d7cd116331, committed 2016-07-07
- Comitter:
- juanitoinig84
- Date:
- Thu Jul 07 04:45:32 2016 +0000
- Parent:
- 4:28c613b8345b
- Commit message:
- Second versi?n
Changed in this revision
main.cpp | Show annotated file Show diff for this revision Revisions of this file |
diff -r 28c613b8345b -r 18d7cd116331 main.cpp --- a/main.cpp Mon Jul 04 19:39:53 2016 +0000 +++ b/main.cpp Thu Jul 07 04:45:32 2016 +0000 @@ -32,8 +32,11 @@ int main() { //int frequency = 0; - ena.period_us(250); - enb.period_us(250); + // ena.period_us(250); + //enb.period_us(250); + + ena.period(1.0/5000.0);// 4Khz period + enb.period(1.0/5000.0);// 4Khz period pc.baud(115200); pc.printf("Peristaltic pumps FRDM-K64F board.\n"); while (true) { @@ -41,10 +44,10 @@ stop1(); //Stop motor wait(2.0f); - turnLeft1(); // Gira en sentido 1 + turnRight1(); // Gira en sentido 1 ena.write(0.50f); //Velocidad 50% wait(2.0f); - turnRight1(); // Gira en sentido 2 + turnLeft1(); // Gira en sentido 2 ena.write(1.00f); // Velocidad 100% wait(2.0f);