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 Lahis Almeida

Stepp.h

Committer:
waspSalander
Date:
2017-06-07
Revision:
0:7cedfb720712
Child:
2:835c883d81b0

File content as of revision 0:7cedfb720712:

#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