Running Motors
Dependencies: Motor Servo mbed
Diff: main.cpp
- Revision:
- 0:5ae4f1df7dd7
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/main.cpp Sat Oct 04 17:16:25 2014 +0000 @@ -0,0 +1,26 @@ +#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); +} + + + +}