
This is a remote control tester, it uses a CNC, Ethernet Communication with a JAVAFX interface and a PLC in order to control some valves.
Dependencies: EthernetInterface mbed-rtos mbed
Fork of CNC_CONTROLLER by
Diff: Stepp.h
- Revision:
- 0:7cedfb720712
- Child:
- 2:835c883d81b0
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/Stepp.h Wed Jun 07 13:31:02 2017 +0000 @@ -0,0 +1,30 @@ +#ifndef MBED_STEPPER_H +#define MBED_STEPPER_H + +#include "mbed.h" +#include "Debug.h" +#include "EixoMonitoring.h" + +#define START_STOP_SPEED 300 // define the Stepper Motor save start/stop speed +#define VERSION 0.3 // define Library version number + +class Stepp { + public: + Stepp(PinName clk, PinName dir, PinName en); + int step(int n_steps, bool direction); + bool findLimits(int n_steps, bool direction, DigitalIn sensor); + float version(void); + + private: + int speed; + bool acell; + PinName pinOrigin; + PinName pinEnd; + DigitalOut _clk; + DigitalOut _dir; + DigitalOut _en; + Debug* debug; + +}; + +#endif