-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathquadstep.h
64 lines (53 loc) · 1.16 KB
/
quadstep.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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
/*
created by Aaron Weiss, SparkFun electronics 2011
Beerware - do what you wish with this ish
*/
#ifndef quadstep_h
#define quadstep_h
#include "WProgram.h"
class quadstep
{
public:
quadstep();
void motor_pins(int motnum,
int motor_enable,
int motor_dir,
int motor_ms1,
int motor_ms2,
int motor_ms3);
void motor_go(int motnum,
int step_size,
int number_of_steps,
int torque);
void stall(int motnum);
//void motor1rpm(int direction,int level);
private:
void current_control(int step);
int _torque;
int step1;
int step2;
int step4;
int step8;
int step16;
int _motor_enable_1;
int _motor_dir_1;
int _motor_ms_11;
int _motor_ms_12;
int _motor_ms_13;
int _motor_enable_2;
int _motor_dir_2;
int _motor_ms_21;
int _motor_ms_22;
int _motor_ms_23;
int _motor_enable_3;
int _motor_dir_3;
int _motor_ms_31;
int _motor_ms_32;
int _motor_ms_33;
int _motor_enable_4;
int _motor_dir_4;
int _motor_ms_41;
int _motor_ms_42;
int _motor_ms_43;
};
#endif