![](/media/cache/img/default_profile.jpg.50x50_q85.jpg)
Delta Robot example
Dependencies: BufferedSerial Eigen
Fork of TCPSocket_Example by
Axis.h
- Committer:
- je310
- Date:
- 2018-10-07
- Revision:
- 4:778bc352c47f
- Parent:
- 3:10fa3102c2d7
- Child:
- 5:01e1e68309ae
File content as of revision 4:778bc352c47f:
#ifndef AXIS_H #define AXIS_H #include "odrive.h" #include "mbed.h" #include "calibration.h" #include "comms.h" #include <string> #include <sstream> enum axisName { AX_A, AX_B, AX_C, }; class Axis { public: Axis(ODrive* od, int ax, DigitalIn* homeSwitch, calVals calibration_,axisName indentity); void homeAxis(); void goAngle(float angle); void goAngleSpeed(float angle, float speed); void runState(int requestedState); DigitalIn* homeSwitch_; void setMaxVel(float stepsPerSec); ODrive* odrive; private: int axNum; int homeOffset; float currentSetPos; float currentSetVel; float maxAngle; //roughtly float gearRatio_; float pulse_per_rev; float pulse_per_rad; float rotation_offset; // defines the rotational ofset from flat, to be calibrated. }; #endif // COMMS_H