Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Fork of m3pi_HelloWorld by
Diff: Controller.cpp
- Revision:
- 8:a6afbbc052e2
diff -r d0689e8f23bf -r a6afbbc052e2 Controller.cpp --- /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); + +} +