Yeongsoo Kim / Mbed 2 deprecated Mecha_Hall_Sensor

Dependencies:   mbed

Committer:
yeongsookim
Date:
Sat Oct 31 07:12:28 2020 +0000
Revision:
1:d43df9a7cef2
Parent:
0:3ead6014ad51
2020 Hall Sensor

Who changed what in which revision?

UserRevisionLine numberNew contents of line
yeongsookim 0:3ead6014ad51 1 #ifndef MBED_MOTOR_H
yeongsookim 0:3ead6014ad51 2 #define MBED_MOTOR_H
yeongsookim 0:3ead6014ad51 3
yeongsookim 0:3ead6014ad51 4 #include "mbed.h"
yeongsookim 0:3ead6014ad51 5
yeongsookim 0:3ead6014ad51 6 #define FORWARD 'f'
yeongsookim 0:3ead6014ad51 7 #define BACKWARD 'b'
yeongsookim 1:d43df9a7cef2 8 #define BRAKE 's'
yeongsookim 0:3ead6014ad51 9
yeongsookim 0:3ead6014ad51 10 class Motor
yeongsookim 0:3ead6014ad51 11 {
yeongsookim 0:3ead6014ad51 12 private:
yeongsookim 0:3ead6014ad51 13 PwmOut IN1_, IN2_;
yeongsookim 0:3ead6014ad51 14 DigitalOut INH1_, INH2_;
yeongsookim 0:3ead6014ad51 15
yeongsookim 0:3ead6014ad51 16 public:
yeongsookim 0:3ead6014ad51 17 Motor(PinName IN1, PinName IN2,PinName INH1, PinName INH2);
yeongsookim 0:3ead6014ad51 18
yeongsookim 0:3ead6014ad51 19 void setSpeed_percent(float percent, char direction);
yeongsookim 0:3ead6014ad51 20 };
yeongsookim 0:3ead6014ad51 21
yeongsookim 0:3ead6014ad51 22 #endif