ai_car1

Dependencies:   mbed ai_car ros_lib_melodic

Actuator/Motor.h

Committer:
wngudwls000
Date:
2021-05-03
Revision:
0:a35213e1e14e

File content as of revision 0:a35213e1e14e:

#ifndef MBED_MOTOR_H
#define MBED_MOTOR_H

#include "mbed.h"

#define FORWARD 'f'
#define BACKWARD 'b'
#define BREAK '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