-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathMrlMotor.h
29 lines (25 loc) · 1.09 KB
/
MrlMotor.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
#ifndef MrlMotor_h
#define MrlMotor_h
/**
* Motor Device
*/
class MrlMotor : public Device {
// details of the different motor controls/types
public:
MrlMotor() : Device(DEVICE_TYPE_MOTOR) {
// TODO: implement classes or custom control for different motor controller types
// usually they require 2 PWM pins, direction & speed... sometimes the logic is a
// little different to drive it.
// GroG: 3 Motor Types so far - probably a single MrlMotor could handle it
// they are MotorDualPwm MotorSimpleH and MotorPulse
// Stepper should be its own MrlStepper
}
void update() {
// we should update the pwm values for the control of the motor device here
// this is potentially where the hardware specific logic could go for various motor controllers
// L298N vs IBT2 vs other... maybe consider a subclass for the type of motor-controller.
// GroG : All motor controller I know of which can be driven by the Arduino fall in the
// MotorDualPwm MotorSimpleH and MotorPulse - categories
}
};
#endif