
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
Stepp.h@2:835c883d81b0, 2017-12-15 (annotated)
- Committer:
- kevencastro7
- Date:
- Fri Dec 15 19:40:41 2017 +0000
- Revision:
- 2:835c883d81b0
- Parent:
- 0:7cedfb720712
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.
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
waspSalander | 0:7cedfb720712 | 1 | #ifndef MBED_STEPPER_H |
waspSalander | 0:7cedfb720712 | 2 | #define MBED_STEPPER_H |
waspSalander | 0:7cedfb720712 | 3 | |
waspSalander | 0:7cedfb720712 | 4 | #include "mbed.h" |
waspSalander | 0:7cedfb720712 | 5 | #include "Debug.h" |
kevencastro7 | 2:835c883d81b0 | 6 | #include "EixoMonitoring.h" |
kevencastro7 | 2:835c883d81b0 | 7 | #include "PCF8574.h" |
kevencastro7 | 2:835c883d81b0 | 8 | |
waspSalander | 0:7cedfb720712 | 9 | |
waspSalander | 0:7cedfb720712 | 10 | #define START_STOP_SPEED 300 // define the Stepper Motor save start/stop speed |
waspSalander | 0:7cedfb720712 | 11 | #define VERSION 0.3 // define Library version number |
waspSalander | 0:7cedfb720712 | 12 | |
waspSalander | 0:7cedfb720712 | 13 | class Stepp { |
waspSalander | 0:7cedfb720712 | 14 | public: |
waspSalander | 0:7cedfb720712 | 15 | Stepp(PinName clk, PinName dir, PinName en); |
waspSalander | 0:7cedfb720712 | 16 | int step(int n_steps, bool direction); |
kevencastro7 | 2:835c883d81b0 | 17 | bool findLimits(int n_steps, bool direction, PCF8574* sensor,int port); |
waspSalander | 0:7cedfb720712 | 18 | float version(void); |
waspSalander | 0:7cedfb720712 | 19 | |
waspSalander | 0:7cedfb720712 | 20 | private: |
waspSalander | 0:7cedfb720712 | 21 | int speed; |
waspSalander | 0:7cedfb720712 | 22 | bool acell; |
waspSalander | 0:7cedfb720712 | 23 | PinName pinOrigin; |
waspSalander | 0:7cedfb720712 | 24 | PinName pinEnd; |
waspSalander | 0:7cedfb720712 | 25 | DigitalOut _clk; |
waspSalander | 0:7cedfb720712 | 26 | DigitalOut _dir; |
waspSalander | 0:7cedfb720712 | 27 | DigitalOut _en; |
waspSalander | 0:7cedfb720712 | 28 | Debug* debug; |
waspSalander | 0:7cedfb720712 | 29 | |
waspSalander | 0:7cedfb720712 | 30 | }; |
waspSalander | 0:7cedfb720712 | 31 | |
waspSalander | 0:7cedfb720712 | 32 | #endif |