first commit
This commit is contained in:
24
include/drivers/MotorController.h
Normal file
24
include/drivers/MotorController.h
Normal file
@@ -0,0 +1,24 @@
|
||||
#ifndef DC_MOTOR_DRIVER_H
|
||||
#define DC_MOTOR_DRIVER_H
|
||||
|
||||
#include <Arduino.h>
|
||||
|
||||
class MotorController {
|
||||
private:
|
||||
const int _pinIA;
|
||||
const int _pinIB;
|
||||
int _currentPower;
|
||||
|
||||
void applyPower();
|
||||
|
||||
public:
|
||||
MotorController(int pinIA, int pinIB);
|
||||
void set(int power);
|
||||
void stop();
|
||||
void maximum();
|
||||
void inc();
|
||||
void dec();
|
||||
int getPower() const;
|
||||
};
|
||||
|
||||
#endif
|
||||
Reference in New Issue
Block a user