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:
kevencastro7
Date:
2017-12-15
Revision:
2:835c883d81b0
Parent:
0:7cedfb720712

File content as of revision 2:835c883d81b0:

#ifndef MBED_STEPPER_H
#define MBED_STEPPER_H

#include "mbed.h"
#include "Debug.h"
#include "EixoMonitoring.h"
#include "PCF8574.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, PCF8574* sensor,int port);  
            float version(void);   
        
    private:  
                        int speed;
                        bool acell;
                        PinName pinOrigin;
                        PinName pinEnd;
            DigitalOut _clk;
            DigitalOut _dir;
            DigitalOut _en;
            Debug* debug;
            
};

#endif