-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathStepp.h
30 lines (24 loc) · 863 Bytes
/
Stepp.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
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