pieter Berteloot
/
Project2
k
Fork of m3pi_HelloWorld by
Diff: Controller.cpp
- Revision:
- 8:a6afbbc052e2
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/Controller.cpp Wed Apr 19 09:51:15 2017 +0000 @@ -0,0 +1,34 @@ +/** + Controller.cpp + Purpose: + + @author Pieter Berteloot +*/ + +#include "mbed.h" +#include "Controller.h" +#include "m3pi.h" + +m3pi m3pi; + +//constructor +Controller::Controller() { + + m3pi.locate(0,1); +}; + + +void Controller::leftMotor(float speedLeft) +{ + +m3pi.left_motor(speedLeft); + +} + +void Controller::rightMotor(float speedRight) +{ + +m3pi.right_motor(speedRight); + +} +