From 65a0212866c586b55f43c599f07d5ec563cb93c8 Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Fri, 2 Jun 2017 12:04:54 -0500 Subject: [PATCH 1/2] Easier override of FILWIDTH_PIN --- Marlin/pins_CHEAPTRONICv2.h | 5 ++++- Marlin/pins_PRINTRBOARD.h | 5 ++++- Marlin/pins_PRINTRBOARD_REVF.h | 5 ++++- Marlin/pins_RAMBO.h | 5 ++++- Marlin/pins_SCOOVO_X9H.h | 5 ++++- 5 files changed, 20 insertions(+), 5 deletions(-) diff --git a/Marlin/pins_CHEAPTRONICv2.h b/Marlin/pins_CHEAPTRONICv2.h index e651d085d4..257380dd66 100644 --- a/Marlin/pins_CHEAPTRONICv2.h +++ b/Marlin/pins_CHEAPTRONICv2.h @@ -111,9 +111,12 @@ // // Other board specific pins // -#define FILWIDTH_PIN 37 #define LED_PIN 13 #define SPINDLE_ENABLE_PIN 4 #define FAN_PIN 3 #define PS_ON_PIN 45 #define KILL_PIN 46 + +#ifndef FILWIDTH_PIN + #define FILWIDTH_PIN 37 // should be Analog Input (0-15) +#endif diff --git a/Marlin/pins_PRINTRBOARD.h b/Marlin/pins_PRINTRBOARD.h index b53db770a5..a679340e74 100644 --- a/Marlin/pins_PRINTRBOARD.h +++ b/Marlin/pins_PRINTRBOARD.h @@ -99,7 +99,10 @@ // Misc. Functions // #define SDSS 26 -#define FILWIDTH_PIN 2 // Analog Input + +#ifndef FILWIDTH_PIN + #define FILWIDTH_PIN 2 // Analog Input +#endif // // LCD / Controller diff --git a/Marlin/pins_PRINTRBOARD_REVF.h b/Marlin/pins_PRINTRBOARD_REVF.h index fa5c3a615a..16753fe327 100644 --- a/Marlin/pins_PRINTRBOARD_REVF.h +++ b/Marlin/pins_PRINTRBOARD_REVF.h @@ -102,7 +102,10 @@ // Misc. Functions // #define SDSS 20 // Teensylu pin mapping -#define FILWIDTH_PIN 2 // Analog Input + +#ifndef FILWIDTH_PIN + #define FILWIDTH_PIN 2 // Analog Input +#endif // // LCD / Controller diff --git a/Marlin/pins_RAMBO.h b/Marlin/pins_RAMBO.h index c99cd79233..a317b1b763 100644 --- a/Marlin/pins_RAMBO.h +++ b/Marlin/pins_RAMBO.h @@ -135,10 +135,13 @@ // #define SDSS 53 #define LED_PIN 13 -#define FILWIDTH_PIN 3 // Analog Input #define PS_ON_PIN 4 #define CASE_LIGHT_PIN 46 +#ifndef FILWIDTH_PIN + #define FILWIDTH_PIN 3 // Analog Input +#endif + // // LCD / Controller // diff --git a/Marlin/pins_SCOOVO_X9H.h b/Marlin/pins_SCOOVO_X9H.h index a5ef15236b..a687c97285 100644 --- a/Marlin/pins_SCOOVO_X9H.h +++ b/Marlin/pins_SCOOVO_X9H.h @@ -118,7 +118,10 @@ #define SDSS 53 #define LED_PIN 13 #define PS_ON_PIN 4 -#define FILWIDTH_PIN 3 // Analog Input + +#ifndef FILWIDTH_PIN + #define FILWIDTH_PIN 3 // Analog Input +#endif // // LCD / Controller From 911079104e0b68b5189b1cd0372f15295b711b63 Mon Sep 17 00:00:00 2001 From: FATALHERMIT Date: Tue, 21 Feb 2017 22:10:04 -0500 Subject: [PATCH 2/2] Support for ZRIB v2.0 Control Board --- Marlin/boards.h | 1 + Marlin/pins.h | 2 ++ Marlin/pins_RAMPS.h | 5 +++-- Marlin/pins_ZRIB_V20.h | 39 +++++++++++++++++++++++++++++++++++++++ 4 files changed, 45 insertions(+), 2 deletions(-) create mode 100644 Marlin/pins_ZRIB_V20.h diff --git a/Marlin/boards.h b/Marlin/boards.h index 32165f53cc..6594b30fac 100644 --- a/Marlin/boards.h +++ b/Marlin/boards.h @@ -95,6 +95,7 @@ #define BOARD_BAM_DICE 401 // 2PrintBeta BAM&DICE with STK drivers #define BOARD_BAM_DICE_DUE 402 // 2PrintBeta BAM&DICE Due with STK drivers #define BOARD_BQ_ZUM_MEGA_3D 503 // bq ZUM Mega 3D +#define BOARD_ZRIB_V20 504 // zrib V2.0 control board (Chinese knock off RAMPS replica) #define MB(board) (MOTHERBOARD==BOARD_##board) diff --git a/Marlin/pins.h b/Marlin/pins.h index aef1083b9c..703df17427 100644 --- a/Marlin/pins.h +++ b/Marlin/pins.h @@ -174,6 +174,8 @@ #include "pins_MKS_13.h" #elif MB(SAINSMART_2IN1) #include "pins_SAINSMART_2IN1.h" +#elif MB(ZRIB_V20) + #include "pins_ZRIB_V20.h" #else #error "Unknown MOTHERBOARD value set in Configuration.h" #endif diff --git a/Marlin/pins_RAMPS.h b/Marlin/pins_RAMPS.h index 629be3b919..4939a2b245 100644 --- a/Marlin/pins_RAMPS.h +++ b/Marlin/pins_RAMPS.h @@ -196,8 +196,9 @@ #define SDSS 53 #define LED_PIN 13 -// Use the RAMPS 1.4 Analog input 5 on the AUX2 connector -#define FILWIDTH_PIN 5 // Analog Input +#ifndef FILWIDTH_PIN + #define FILWIDTH_PIN 5 // Analog Input on AUX2 +#endif // define digital pin 4 for the filament runout sensor. Use the RAMPS 1.4 digital input 4 on the servos connector #define FIL_RUNOUT_PIN 4 diff --git a/Marlin/pins_ZRIB_V20.h b/Marlin/pins_ZRIB_V20.h new file mode 100644 index 0000000000..1437c71840 --- /dev/null +++ b/Marlin/pins_ZRIB_V20.h @@ -0,0 +1,39 @@ +/** + * Marlin 3D Printer Firmware + * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] + * + * Based on Sprinter and grbl. + * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + * + */ + +/** + * ZRIB V2.0 pin assignments + */ + +#define ZRIB_V20_D6_PIN 6 +#define ZRIB_V20_D9_PIN 9 +#define RAMPS_D9_PIN ZRIB_V20_D6_PIN +#define ORIG_E0_AUTO_FAN_PIN ZRIB_V20_D9_PIN +#define ORIG_E1_AUTO_FAN_PIN ZRIB_V20_D9_PIN +#define ORIG_E2_AUTO_FAN_PIN ZRIB_V20_D9_PIN +#define ORIG_E3_AUTO_FAN_PIN ZRIB_V20_D9_PIN + +#ifndef FILWIDTH_PIN + #define FILWIDTH_PIN 11 // Analog Input +#endif + +#include "pins_MKS_13.h"