blob: a67f0b73114afb189b8ca82114481312360278d7 (
plain)
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
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
|
// Yep, this is actually -*- c++ -*-
#ifndef INIT_H_
#define INIT_H_
// Prints debug output on the serial port - makes stuff slower
#define DEBUG 1
// define the parameters of our machine.
#define X_STEPS_PER_INCH 270.210
#define X_STEPS_PER_MM 10.6382
#define X_MOTOR_STEPS 200
#define Y_STEPS_PER_INCH 270.21028
#define Y_STEPS_PER_MM 10.6382
#define Y_MOTOR_STEPS 200
#define Z_STEPS_PER_INCH 7035.8
#define Z_STEPS_PER_MM 277
#define Z_MOTOR_STEPS 200
//our maximum feedrates
#define FAST_XY_FEEDRATE 1000.0
#define FAST_Z_FEEDRATE 50.0
// Units in curve section
#define CURVE_SECTION_INCHES 0.019685
#define CURVE_SECTION_MM 0.5
// Set to one if endstop outputs are inverting (ie: 1 means open, 0 means closed)
// RepRap opto endstops are *not* inverting.
#define ENDSTOPS_INVERTING 0
// Optionally disable max endstops to save pins or wiring
#define ENDSTOP_X_MIN_ENABLED 1
#define ENDSTOP_X_MAX_ENABLED 0
#define ENDSTOP_Y_MIN_ENABLED 1
#define ENDSTOP_Y_MAX_ENABLED 0
#define ENDSTOP_Z_MIN_ENABLED 0
#define ENDSTOP_Z_MAX_ENABLED 0
// How many temperature samples to take. each sample takes about 100 usecs.
#define TEMPERATURE_SAMPLES 5
// The *_ENABLE_PIN signals are active high as default. Define this
// to one if they should be active low instead (e.g. if you're using different
// stepper boards).
// RepRap stepper boards are *not* inverting.
#define INVERT_ENABLE_PINS 0
// If you use this firmware on a cartesian platform where the
// stepper direction pins are inverted, set these defines to 1
// for the axes which should be inverted.
// RepRap stepper boards are *not* inverting.
#define INVERT_X_DIR 0
#define INVERT_Y_DIR 0
#define INVERT_Z_DIR 0
// Defines in which logical direction to move when using the G30 command
// (home to physical reference switches). 1 is positive, 0 is negative
#define REFERENCE_X_DIR 0
#define REFERENCE_Y_DIR 0
#define REFERENCE_Z_DIR 0
/****************************************************************************************
* digital i/o pin assignment
*
* this uses the undocumented feature of Arduino - pins 14-19 correspond to analog 0-5
****************************************************************************************/
//cartesian bot pins
#define X_STEP_PIN 15
#define X_DIR_PIN 18
#define X_ENABLE_PIN 19
#define X_MIN_PIN 20
#define X_MAX_PIN 21
#define Y_STEP_PIN 23
#define Y_DIR_PIN 22
#define Y_ENABLE_PIN 19
#define Y_MIN_PIN 25
#define Y_MAX_PIN 26
#define Z_STEP_PIN 29
#define Z_DIR_PIN 30
#define Z_ENABLE_PIN 31
#define Z_MIN_PIN 2
#define Z_MAX_PIN 1
//extruder pins
#define EXTRUDER_MOTOR_SPEED_PIN 12
#define EXTRUDER_MOTOR_DIR_PIN 26
#define EXTRUDER_HEATER_PIN 14
#define EXTRUDER_FAN_PIN 3
#define EXTRUDER_THERMISTOR_PIN 4 //NB! analog pin, -1 disables thermistor readings
#define EXTRUDER_THERMOCOUPLE_PIN -1 //NB! analog pin, -1 disables thermocouple readings
// Enable/disable features
#define ENABLE_ARCS 0
enum Axis {
X_AXIS = 0,
Y_AXIS = 1,
Z_AXIS = 2
};
struct AxisConfig {
uint8_t step_pin;
uint8_t dir_pin;
uint8_t min_pin;
uint8_t max_pin;
uint8_t enable_pin;
bool invert_dir;
bool reference_dir;
bool min_endstop_enabled;
bool max_endstop_enabled;
uint16_t steps_per_inch;
uint16_t steps_per_mm;
uint16_t motor_steps;
};
extern AxisConfig axes[3];
#endif // INIT_H_
|