Running Motors

Dependencies:   Motor Servo mbed

main.cpp

Committer:
170198
Date:
2014-10-04
Revision:
0:5ae4f1df7dd7

File content as of revision 0:5ae4f1df7dd7:

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

int main() {
DigitalIn sw[4]={p16, p17, p18, p19};
BusOut light(p5, p6, p7, p8, p11); 
Motor dc_1(p26, p29, p30);
Motor dc_2(p25, p27, p28);
Servo motor_1(p21); 
Servo motor_2(p22);
int ted;
int joe;
joe=0;
ted=0;
    if (sw[0]==1)
    {
        ted=1;
        dc_1.speed(ted);
        joe=1;
        dc_2.speed(joe);
}



}