From ca409e5531d6f96b54ce919aaf41cfad9e565dda Mon Sep 17 00:00:00 2001
From: Johann Rocholl <johann@rocholl.net>
Date: Tue, 11 Dec 2012 01:59:48 -0800
Subject: [PATCH] Fix X/Y/Z_MIN_PIN for Printrboard.

---
 Marlin/pins.h | 15 ++++++++++-----
 1 file changed, 10 insertions(+), 5 deletions(-)

diff --git a/Marlin/pins.h b/Marlin/pins.h
index 59f86a5ac7..8e9680b725 100644
--- a/Marlin/pins.h
+++ b/Marlin/pins.h
@@ -973,19 +973,16 @@
 #define X_STEP_PIN          0
 #define X_DIR_PIN           1
 #define X_ENABLE_PIN       39
-#define X_MIN_PIN          13
 #define X_MAX_PIN          -1
 
 #define Y_STEP_PIN          2
 #define Y_DIR_PIN           3
 #define Y_ENABLE_PIN       38
-#define Y_MIN_PIN          14
 #define Y_MAX_PIN          -1
 
 #define Z_STEP_PIN          4
 #define Z_DIR_PIN           5
 #define Z_ENABLE_PIN       23
-#define Z_MIN_PIN          15
 #define Z_MAX_PIN          -1
 
 #define E0_STEP_PIN         6
@@ -997,11 +994,19 @@
 #define HEATER_2_PIN       -1
 #define HEATER_BED_PIN     20  // Bed
 #define FAN_PIN            22  // Fan
+// You may need to change FAN_PIN to 16 because Marlin isn't using fastio.h
+// for the fan and Teensyduino uses a different pin mapping.
 
-#if MOTHERBOARD == 8
+#if MOTHERBOARD == 8  // Teensylu
+  #define X_MIN_PIN          13
+  #define Y_MIN_PIN          14
+  #define Z_MIN_PIN          15
   #define TEMP_0_PIN          7  // Extruder / Analog pin numbering
   #define TEMP_BED_PIN        6  // Bed / Analog pin numbering
-#else
+#else  // Printrboard
+  #define X_MIN_PIN          35
+  #define Y_MIN_PIN           8
+  #define Z_MIN_PIN          36
   #define TEMP_0_PIN          1  // Extruder / Analog pin numbering
   #define TEMP_BED_PIN        0  // Bed / Analog pin numbering
 #endif
-- 
GitLab