PWM with L298

Dependencies:   mbed TextLCD1

Fork of L298 by Hernán Maya

Revision:
4:28c613b8345b
Parent:
3:c06b4a48e08a
Child:
5:18d7cd116331
diff -r c06b4a48e08a -r 28c613b8345b main.cpp
--- a/main.cpp	Fri Jul 01 03:38:09 2016 +0000
+++ b/main.cpp	Mon Jul 04 19:39:53 2016 +0000
@@ -14,6 +14,7 @@
 DigitalOut in2(PTC2);
 PwmOut     ena(PTA2);
 
+
 DigitalOut in3(PTD1);
 DigitalOut in4(PTD2);
 PwmOut     enb(PTD3);
@@ -30,6 +31,9 @@
 
 int main()
 {
+    //int frequency = 0;
+    ena.period_us(250);
+    enb.period_us(250);
     pc.baud(115200);
     pc.printf("Peristaltic pumps FRDM-K64F board.\n");
     while (true) {
@@ -52,7 +56,7 @@
         wait(2.0f);
         turnLeft2();                // Gira en sentido 2
         enb.write(1.00f);           //velocidad 100%
-        wait(0.5f);
+        wait(2.0f);
     }
 }