Program for controlling speed of motor

Dependencies:   mbed

Fork of DC_motor_1 by Dean Fraj

Revision:
1:36da0aeaa51f
Parent:
0:1047df2357c5
--- a/main.cpp	Mon Dec 18 10:32:36 2017 +0000
+++ b/main.cpp	Mon Dec 18 10:52:02 2017 +0000
@@ -1,13 +1,15 @@
 #include "mbed.h"
 
-PwmOut motor(p21);
+PwmOut smjer1(p21);
+PwmOut smjer2(p22);
 PwmOut ledica(LED1);
 AnalogIn pot(p20);
  
 int main(){
-    motor.period(0.001);
+    smjer1.period(0.001);
+    smjer2 = 0;
     while(true){
-        motor = pot;    
+        smjer1 = pot;    
         ledica = pot;    
     }
 }
\ No newline at end of file