X end stop doesn't work [Ramps 1.4 + Arduino Mega 2560, Marlin] December 04, 2015 02:38PM |
Registered: 8 years ago Posts: 5 |
Re: X end stop doesn't work [Ramps 1.4 + Arduino Mega 2560, Marlin] December 05, 2015 03:39AM |
Registered: 8 years ago Posts: 5,232 |
Re: X end stop doesn't work [Ramps 1.4 + Arduino Mega 2560, Marlin] December 05, 2015 05:46AM |
Registered: 8 years ago Posts: 5 |
Re: X end stop doesn't work [Ramps 1.4 + Arduino Mega 2560, Marlin] December 06, 2015 04:51AM |
Registered: 8 years ago Posts: 5,232 |
Re: X end stop doesn't work [Ramps 1.4 + Arduino Mega 2560, Marlin] December 06, 2015 05:42AM |
Registered: 8 years ago Posts: 5 |
Re: X end stop doesn't work [Ramps 1.4 + Arduino Mega 2560, Marlin] December 07, 2015 03:01PM |
Registered: 8 years ago Posts: 5 |
#ifndef PINS_H #define PINS_H #define X_MS1_PIN -1 #define X_MS2_PIN -1 #define X_MS3_PIN -1 #define Y_MS1_PIN -1 #define Y_MS2_PIN -1 #define Y_MS3_PIN -1 #define Z_MS1_PIN -1 #define Z_MS2_PIN -1 #define Z_MS3_PIN -1 #define DIGIPOTSS_PIN -1 /**************************************************************************************** * Arduino Mega pin assignment * ****************************************************************************************/ #if MOTHERBOARD == 33 #define KNOWN_BOARD 1 #ifndef __AVR_ATmega1280__ #ifndef __AVR_ATmega2560__ #error Oops! Make sure you have 'Arduino Mega' selected from the 'Tools -> Boards' menu. #endif #endif #if MOTHERBOARD == 33 #define LARGE_FLASH true #define X_STEP_PIN 54 #define X_DIR_PIN 55 #define X_ENABLE_PIN 38 #define X_MIN_PIN 2 #define X_MAX_PIN 3 #define Y_STEP_PIN 60 #define Y_DIR_PIN 61 #define Y_ENABLE_PIN 56 #define Y_MIN_PIN 14 #define Y_MAX_PIN 15 #define Z_STEP_PIN 46 #define Z_DIR_PIN 48 #define Z_ENABLE_PIN 62 #define Z_MIN_PIN 18 #define Z_MAX_PIN 19 #define SDPOWER -1 #define SDSS 53 #define LED_PIN 13 #define PS_ON_PIN 12 #if defined(REPRAP_DISCOUNT_SMART_CONTROLLER) || defined(G3D_PANEL) #define KILL_PIN 41 #else #define KILL_PIN -1 #endif #ifdef ULTRA_LCD #ifdef NEWPANEL #define LCD_PINS_RS 16 #define LCD_PINS_ENABLE 17 #define LCD_PINS_D4 23 #define LCD_PINS_D5 25 #define LCD_PINS_D6 27 #define LCD_PINS_D7 29 #ifdef REPRAP_DISCOUNT_SMART_CONTROLLER #define BEEPER 37 #define BTN_EN1 31 #define BTN_EN2 33 #define BTN_ENC 35 #define SDCARDDETECT 49 #elif defined(LCD_I2C_PANELOLU2) #define BTN_EN1 47 //reverse if the encoder turns the wrong way. #define BTN_EN2 43 #define BTN_ENC 32 #define SDSS 53 #define SDCARDDETECT -1 #define KILL_PIN 41 #elif defined(LCD_I2C_VIKI) #define BTN_EN1 22 //reverse if the encoder turns the wrong way. #define BTN_EN2 7 #define BTN_ENC -1 #define SDSS 53 #define SDCARDDETECT 49 #else //arduino pin which triggers an piezzo beeper #define BEEPER 33 // Beeper on AUX-4 //buttons are directly attached using AUX-2 #ifdef REPRAPWORLD_KEYPAD #define BTN_EN1 64 // encoder #define BTN_EN2 59 // encoder #define BTN_ENC 63 // enter button #define SHIFT_OUT 40 // shift register #define SHIFT_CLK 44 // shift register #define SHIFT_LD 42 // shift register #else #define BTN_EN1 37 #define BTN_EN2 35 #define BTN_ENC 31 //the click #endif #ifdef G3D_PANEL #define SDCARDDETECT 49 #else #define SDCARDDETECT -1 // Ramps does not use this port #endif #endif #else //old style panel with shift register //arduino pin witch triggers an piezzo beeper #define BEEPER 33 //No Beeper added //buttons are attached to a shift register // Not wired this yet //#define SHIFT_CLK 38 //#define SHIFT_LD 42 //#define SHIFT_OUT 40 //#define SHIFT_EN 17 #define LCD_PINS_RS 16 #define LCD_PINS_ENABLE 17 #define LCD_PINS_D4 23 #define LCD_PINS_D5 25 #define LCD_PINS_D6 27 #define LCD_PINS_D7 29 #endif #endif //ULTRA_LCD #else // RAMPS_V_1_1 or RAMPS_V_1_2 as default (MOTHERBOARD == 3) #endif // SPI for Max6675 Thermocouple #ifndef SDSUPPORT // these pins are defined in the SD library if building with SD support #define MAX_SCK_PIN 52 #define MAX_MISO_PIN 50 #define MAX_MOSI_PIN 51 #define MAX6675_SS 53 #else #define MAX6675_SS 49 #endif #endif //MOTHERBOARD == 3 || MOTHERBOARD == 33 || MOTHERBOARD == 34 || MOTHERBOARD == 35 || MOTHERBOARD == 77 #ifndef KNOWN_BOARD #error Unknown MOTHERBOARD value in configuration.h #endif //List of pins which to ignore when asked to change by gcode, 0 and 1 are RX and TX, do not mess with those! #ifdef X_STOP_PIN #if X_HOME_DIR < 0 #define X_MIN_PIN X_STOP_PIN #define X_MAX_PIN -1 #else #define X_MIN_PIN -1 #define X_MAX_PIN X_STOP_PIN #endif #endif #ifdef Y_STOP_PIN #if Y_HOME_DIR < 0 #define Y_MIN_PIN Y_STOP_PIN #define Y_MAX_PIN -1 #else #define Y_MIN_PIN -1 #define Y_MAX_PIN Y_STOP_PIN #endif #endif #ifdef Z_STOP_PIN #if Z_HOME_DIR < 0 #define Z_MIN_PIN Z_STOP_PIN #define Z_MAX_PIN -1 #else #define Z_MIN_PIN -1 #define Z_MAX_PIN Z_STOP_PIN #endif #endif #ifdef DISABLE_MAX_ENDSTOPS #define X_MAX_PIN -1 #define Y_MAX_PIN -1 #define Z_MAX_PIN -1 #endif #ifdef DISABLE_MIN_ENDSTOPS #define X_MIN_PIN -1 #define Y_MIN_PIN -1 #define Z_MIN_PIN -1 #endif #define SENSITIVE_PINS {0, 1, X_STEP_PIN, X_DIR_PIN, X_ENABLE_PIN, X_MIN_PIN, X_MAX_PIN, Y_STEP_PIN, Y_DIR_PIN, Y_ENABLE_PIN, Y_MIN_PIN, Y_MAX_PIN, Z_STEP_PIN, Z_DIR_PIN, Z_ENABLE_PIN, Z_MIN_PIN, Z_MAX_PIN, PS_ON_PIN, \ \ \ } #endif