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.
Dependencies: mbed-rtos mbed QEI
Fork of ICRSEurobot13 by
Actuators/MainMotor/MainMotor.h
- Committer:
- twighk
- Date:
- 2013-03-29
- Revision:
- 0:200635fa1b08
File content as of revision 0:200635fa1b08:
// Eurobot13 MainMotor.h #include "mbed.h" class MainMotor{ private: PwmOut PWM1; PwmOut PWM2; public: MainMotor(PinName pin1, PinName pin2) : PWM1(pin1), PWM2(pin2){ } void operator()(float in){ power(in); } void power(float power){ if( power > 0 ){ PWM1 = power; PWM2 = 0; } else { PWM1 = 0; PWM2 = -power; } } };