Kontrol Motor

Dependencies:   Motor mbed

motor.cpp

Committer:
Sufa
Date:
2016-10-29
Revision:
1:9a48ed5c8b73
Parent:
0:5b69ef2e8d34

File content as of revision 1:9a48ed5c8b73:

// Made by Sul Fau//
//17 09 2016//

#include "Motor.h"
#include "mbed.h"

Motor myMotor (D10, D11, D12);
Motor myMotor2 (PA_11, PC_15, PA_15);

int main (void)
{
    int s;
    float a = 1.0;
    while (1) {
        myMotor.speed(0.75);
        myMotor2.speed(-0.75);
        wait_ms(5000);
      //  myMotor.brake(1);
      //  myMotor2.brake(1);
      //  wait_ms(1000);
      //  myMotor.speed(-0.5);
      //  myMotor2.speed(-0.5);
      //  wait_ms(5000);
      //  myMotor.brake(1);
      //  myMotor2.brake(1);
      //  wait(5);
      //  for (s = 1; s <= 10; s++)
      //  {
     //       myMotor.speed(a);
     //       myMotor2.speed(a);
      //      a = a - 0.25;
     //       wait_ms(2000);
     //   }
    }
}