init
This commit is contained in:
@@ -0,0 +1,29 @@
|
||||
// MOTOR.h
|
||||
#ifndef MOTOR_h
|
||||
#define MOTOR_h
|
||||
|
||||
#include <Servo.h>
|
||||
#include <Arduino.h>
|
||||
#include "enums.h" // Include the enums header file
|
||||
|
||||
class MOTOR {
|
||||
private:
|
||||
int pinESC;
|
||||
Servo esc;
|
||||
int currentSpeed;
|
||||
void setSpeedInternal(int speed);
|
||||
MotorPosition motorPosition;
|
||||
|
||||
public:
|
||||
const int minSpeed = 1000;
|
||||
const int maxSpeed = 2000;
|
||||
const int speedInterval = 10;
|
||||
void setMotorPosition(MotorPosition mp);
|
||||
void setPinESC(int pin);
|
||||
void setSpeed(int speed);
|
||||
int getSpeed();
|
||||
void accelerate();
|
||||
void decelerate();
|
||||
};
|
||||
|
||||
#endif
|
||||
Reference in New Issue
Block a user