Basic motor code
Dependencies: Motordriver mbed HALLFX_ENCODER Servo
main.cpp
- Committer:
- amohile3
- Date:
- 2018-04-18
- Revision:
- 0:191d0be60c80
- Child:
- 1:560118dc2f99
File content as of revision 0:191d0be60c80:
#include "mbed.h" #include "motordriver.h" Motor right(p23,p5,p6, 1); // pwm, fwd, rev Motor left(p21, p7, p8, 1); // pwm, fwd, rev //void forward(int distance) { // //} // //void reverse(int distance) { // //} int main() { right.speed(0.15); left.speed(0.15); wait(5); right.speed(0.0); left.speed(0.0); }