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.
Actuator/Motor.h
- Committer:
- yeongsookim
- Date:
- 2020-10-31
- Revision:
- 1:d43df9a7cef2
- Parent:
- 0:3ead6014ad51
File content as of revision 1:d43df9a7cef2:
#ifndef MBED_MOTOR_H
#define MBED_MOTOR_H
#include "mbed.h"
#define FORWARD 'f'
#define BACKWARD 'b'
#define BRAKE 's'
class Motor
{
private:
PwmOut IN1_, IN2_;
DigitalOut INH1_, INH2_;
public:
Motor(PinName IN1, PinName IN2,PinName INH1, PinName INH2);
void setSpeed_percent(float percent, char direction);
};
#endif