10/25/2015
Dependencies: PID mbed MaxSonar eeprom iSerial Fork_Boss_Communication_Robot
Diff: move.cpp
- Revision:
- 0:f02641e3fb91
- Child:
- 2:933d3edf38da
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/move.cpp Fri Oct 16 08:05:52 2015 +0000 @@ -0,0 +1,23 @@ +#include "mbed.h" +#include "move.h" + + + +DigitalOut dir1(D3); +DigitalOut dir2(D4); +PwmOut speeds(D5); + void move:: movespeed(int dir,float spd) +{ + if(dir==1) + { + dir1=1; + dir2=0; + } + else + { + dir1=0; + dir2=1; + } + speeds=speeds+spd; + +} \ No newline at end of file