A simple stepper motor driver library, supporting micro-stepping drivers.
Dependents: Test_LCDTS_UI_StepperMove
Diff: Table.h
- Revision:
- 2:97b1bc1f0b5f
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/Table.h Sat Nov 14 11:44:18 2020 +0000 @@ -0,0 +1,36 @@ +#ifndef MBED_TABLE_H +#define MBED_TABLE_H + +#include "Stepper.h" + +struct table_pins +{ + PinName X_en; + PinName X_stepPin; + PinName X_dir; + PinName Y_en; + PinName Y_stepPin; + PinName Y_dirG; + PinName Y_dirD; +}; + +struct position +{ + float X; + float Y; +}; + +bool operator == (const position &pos1, const position &pos2){ + return (pos1.X == pos2.X) && (pos1.Y == pos2.Y); } + +class table +{ +public: + table(table_pins _tablepin) ; + void move(position pos_current, position pos_togo, float speed); +private: + stepper *stepper_X; + steppers *steppers_Y; +}; + +#endif // MBED_TABLE_H \ No newline at end of file