-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathRobotArmJoint.h
38 lines (30 loc) · 923 Bytes
/
RobotArmJoint.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
30
31
32
33
34
35
36
37
38
#ifndef ROBOT_ARM_JOINT_H
#define ROBOT_ARM_JOINT_H
#include "AccelStepper.h"
#include "Config.h"
class RobotArmJoint
{
protected:
AccelStepper mMotor;
uint8_t mStepPin;
uint8_t mDirPin;
uint8_t mEnablePin;
long mStepsPerRevolution;
float mMaxSpeed;
float mAcceleration;
public:
RobotArmJoint();
void init(const int32_t nStepPin, const int32_t nDirPin, const int32_t nEnablePin, const long nStepsPerRevolution,
Microstepping microsteping);
void setMaxSpeed(const float maxSpeed);
int32_t getMaxSpeed();
void setAcceleration(const float acceleration);
int32_t getAcceleration();
void setMaxSpeedMultiplier(const float nMultiplier);
void setAccelerationMultiplier(const float nMultiplier);
float getMaxSpeedMultiplier();
float getAccelerationMultiplier();
AccelStepper& getMotor();
};
// This is the end of the header guard
#endif