that pulls down the SDCARDDETECT pin and mimicking the pull and reinsert ofa a SD card
//#define ULTRA_LCD //general lcd support, also 16x2
#define SDSUPPORT // Enable SD Card Support in Hardware Console
+// Invert the SD card Detect Pin.
+// If you are using a RAMPS board or cheap E-bay purchased boards that do not detect when an SD card is inserted
+// You can get round this by connecting a push button or single throw switch to the pin defined as SDCARDCARDDETECT
+// in the pins.h file. When using a push button pulling the pin to ground this will need inverted. This setting should
+// be commented out otherwise
+#define SDCARDDETECTINVERTED
+
#define ULTIPANEL
#ifdef ULTIPANEL
#define NEWPANEL //enable this if you have a click-encoder panel
#ifdef ULTRA_LCD
#ifdef NEWPANEL
- //arduino pin witch triggers an piezzo beeper
- #define BEEPER -1 // No Beeper added
+ //arduino pin which triggers an piezzo beeper
+ #define BEEPER 33 // Beeper on AUX-4
#define LCD_PINS_RS 16
#define LCD_PINS_ENABLE 17
#define BLEN_B 1
#define BLEN_A 0
- #define SDCARDDETECT -1 // Ramps does not use this port
+ #define SDCARDDETECT 31 // Ramps does not use this port
//encoder rotation values
#define encrot0 0
#else //old style panel with shift register
//arduino pin witch triggers an piezzo beeper
- #define BEEPER -1 No Beeper added
+ #define BEEPER 33 No Beeper added
//buttons are attached to a shift register
// Not wired this yet
#define CLICKED (buttons&EN_C)
#define BLOCK {blocking=millis()+blocktime;}
- #define CARDINSERTED (READ(SDCARDDETECT)==0)
-
+
+ #ifdef SDCARDDETECTINVERTED
+ #define CARDINSERTED (READ(SDCARDDETECT)!=0)
+
+ #else
+ #define CARDINSERTED (READ(SDCARDDETECT)==0)
+
+ #endif //SDCARDTETECTINVERTED
+
#else
//atomatic, do not change