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.
Diff: YellowMotors.h
- Revision:
- 5:6dbb019203e9
- Parent:
- 4:aef786c67b2d
--- a/YellowMotors.h Fri Feb 05 15:49:11 2016 +0000 +++ b/YellowMotors.h Fri Feb 05 16:28:29 2016 +0000 @@ -33,7 +33,7 @@ public: PwmOut _pwmPin; float _pwmSigned; // signed with direction - int speed; + int speed; // to be done MotorItself() : _pwmPin(NC) {}; MotorItself(PinName pwmPin): _pwmPin(pwmPin) {}; // fuck you, you default constructor. /* @@ -61,9 +61,9 @@ YellowMotors(PinName clk = D4, PinName lat = D12, PinName dat = D8, PinName ena = D7, PinName Lpwm = D11, PinName Rpwm = D3); void setDirections(char); // shift directions to shift register on Adafruit motor shield v1 void operator= (const float value); - void set(float value, int whichMotor = -1); - float get(int whichMotor = -1); - void attachled(DigitalOut & led); + void set(float value, int whichMotor = -1); // set speed of a motor. float. second parameter is which motor. L is 0 , R is 1 , -1 is both (default) + float get(int whichMotor = -1); // get the value from the class, so you don't have to keep track of it by yourself + void attachled(DigitalOut & led); // pass an initalized DigitalOut object for a library to use it as debuging LED void dettachled() { delete _led; } ;