Added support for Elefu RA Board and Elefu Control Panel
This commit is contained in:
parent
e3bc420daa
commit
b27a59f41e
@ -46,9 +46,10 @@
|
|||||||
// 90 = Alpha OMCA board
|
// 90 = Alpha OMCA board
|
||||||
// 91 = Final OMCA board
|
// 91 = Final OMCA board
|
||||||
// 301 = Rambo
|
// 301 = Rambo
|
||||||
|
// 21 = Elefu Ra Board (v3)
|
||||||
|
|
||||||
#ifndef MOTHERBOARD
|
#ifndef MOTHERBOARD
|
||||||
#define MOTHERBOARD 7
|
#define MOTHERBOARD 21
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
//// The following define selects which power supply you have. Please choose the one that matches your setup
|
//// The following define selects which power supply you have. Please choose the one that matches your setup
|
||||||
@ -84,10 +85,10 @@
|
|||||||
// 52 is 200k thermistor - ATC Semitec 204GT-2 (1k pullup)
|
// 52 is 200k thermistor - ATC Semitec 204GT-2 (1k pullup)
|
||||||
// 55 is 100k thermistor - ATC Semitec 104GT-2 (Used in ParCan) (1k pullup)
|
// 55 is 100k thermistor - ATC Semitec 104GT-2 (Used in ParCan) (1k pullup)
|
||||||
|
|
||||||
#define TEMP_SENSOR_0 -1
|
#define TEMP_SENSOR_0 1
|
||||||
#define TEMP_SENSOR_1 0
|
#define TEMP_SENSOR_1 0
|
||||||
#define TEMP_SENSOR_2 0
|
#define TEMP_SENSOR_2 0
|
||||||
#define TEMP_SENSOR_BED 0
|
#define TEMP_SENSOR_BED 1
|
||||||
|
|
||||||
// Actual temperature must be close to target for this long before M109 returns success
|
// Actual temperature must be close to target for this long before M109 returns success
|
||||||
#define TEMP_RESIDENCY_TIME 10 // (seconds)
|
#define TEMP_RESIDENCY_TIME 10 // (seconds)
|
||||||
@ -338,6 +339,15 @@ const bool Z_ENDSTOPS_INVERTING = true; // set to true to invert the logic of th
|
|||||||
// ==> REMEMBER TO INSTALL U8glib to your ARDUINO library folder: http://code.google.com/p/u8glib/wiki/u8glib
|
// ==> REMEMBER TO INSTALL U8glib to your ARDUINO library folder: http://code.google.com/p/u8glib/wiki/u8glib
|
||||||
//#define REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER
|
//#define REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER
|
||||||
|
|
||||||
|
// The Elefu RA Board Control Panel
|
||||||
|
// http://www.elefu.com/index.php?route=product/product&product_id=53
|
||||||
|
// REMEMBER TO INSTALL LiquidCrystal_I2C.h in your ARUDINO library folder: http://hmario.home.xs4all.nl/arduino/LiquidCrystal_I2C/LiquidCrystal_I2C.zip
|
||||||
|
#define RA_CONTROL_PANEL
|
||||||
|
|
||||||
|
// The Elefu TLC5947 RGB Lighting Module
|
||||||
|
// Uncomment to enable TLC5947 Lighting Modules.
|
||||||
|
//#define RA_DISCO
|
||||||
|
|
||||||
//automatic expansion
|
//automatic expansion
|
||||||
#if defined (REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER)
|
#if defined (REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER)
|
||||||
#define DOGLCD
|
#define DOGLCD
|
||||||
@ -350,6 +360,13 @@ const bool Z_ENDSTOPS_INVERTING = true; // set to true to invert the logic of th
|
|||||||
#define NEWPANEL
|
#define NEWPANEL
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#if defined(RA_CONTROL_PANEL)
|
||||||
|
#define ULTIPANEL
|
||||||
|
#define NEWPANEL
|
||||||
|
#define LCD_I2C_TYPE_PCA8574
|
||||||
|
#define LCD_I2C_ADDRESS 0x27 // I2C Address of the port expander
|
||||||
|
#endif
|
||||||
|
|
||||||
// Preheat Constants
|
// Preheat Constants
|
||||||
#define PLA_PREHEAT_HOTEND_TEMP 180
|
#define PLA_PREHEAT_HOTEND_TEMP 180
|
||||||
#define PLA_PREHEAT_HPB_TEMP 70
|
#define PLA_PREHEAT_HPB_TEMP 70
|
||||||
|
@ -34,7 +34,13 @@
|
|||||||
#include "pins.h"
|
#include "pins.h"
|
||||||
|
|
||||||
#ifdef ULTRA_LCD
|
#ifdef ULTRA_LCD
|
||||||
#ifdef DOGLCD
|
#if defined(LCD_I2C_TYPE_PCF8575)
|
||||||
|
#include <Wire.h>
|
||||||
|
#include <LiquidCrystal_I2C.h>
|
||||||
|
#elif defined(LCD_I2C_TYPE_MCP23017) || defined(LCD_I2C_TYPE_MCP23008)
|
||||||
|
#include <Wire.h>
|
||||||
|
#include <LiquidTWI2.h>
|
||||||
|
#elif defined DOGLCD
|
||||||
#include <U8glib.h> // library for graphics LCD by Oli Kraus (https://code.google.com/p/u8glib/)
|
#include <U8glib.h> // library for graphics LCD by Oli Kraus (https://code.google.com/p/u8glib/)
|
||||||
#else
|
#else
|
||||||
#include <LiquidCrystal.h> // library for character LCD
|
#include <LiquidCrystal.h> // library for character LCD
|
||||||
|
129
Marlin/pins.h
129
Marlin/pins.h
@ -53,6 +53,7 @@
|
|||||||
|
|
||||||
#endif /* 99 */
|
#endif /* 99 */
|
||||||
|
|
||||||
|
|
||||||
/****************************************************************************************
|
/****************************************************************************************
|
||||||
* Gen7 v1.1, v1.2, v1.3 pin assignment
|
* Gen7 v1.1, v1.2, v1.3 pin assignment
|
||||||
*
|
*
|
||||||
@ -575,6 +576,131 @@
|
|||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
/****************************************************************************************
|
||||||
|
* Elefu RA Board Pin Assignments
|
||||||
|
*
|
||||||
|
****************************************************************************************/
|
||||||
|
#if MOTHERBOARD == 21
|
||||||
|
#define KNOWN_BOARD 1
|
||||||
|
|
||||||
|
#ifndef __AVR_ATmega2560__
|
||||||
|
#error Oops! Make sure you have 'Arduino Mega' selected from the 'Tools -> Boards' menu.
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
#define X_STEP_PIN 49
|
||||||
|
#define X_DIR_PIN 13
|
||||||
|
#define X_ENABLE_PIN 48
|
||||||
|
#define X_MIN_PIN 35
|
||||||
|
#define X_MAX_PIN -1 //34
|
||||||
|
|
||||||
|
#define Y_STEP_PIN 11
|
||||||
|
#define Y_DIR_PIN 9
|
||||||
|
#define Y_ENABLE_PIN 12
|
||||||
|
#define Y_MIN_PIN 33
|
||||||
|
#define Y_MAX_PIN -1 //32
|
||||||
|
|
||||||
|
#define Z_STEP_PIN 7
|
||||||
|
#define Z_DIR_PIN 6
|
||||||
|
#define Z_ENABLE_PIN 8
|
||||||
|
#define Z_MIN_PIN 31
|
||||||
|
#define Z_MAX_PIN -1 //30
|
||||||
|
|
||||||
|
#define E2_STEP_PIN 43
|
||||||
|
#define E2_DIR_PIN 47
|
||||||
|
#define E2_ENABLE_PIN 42
|
||||||
|
|
||||||
|
#define E1_STEP_PIN 18
|
||||||
|
#define E1_DIR_PIN 19
|
||||||
|
#define E1_ENABLE_PIN 38
|
||||||
|
|
||||||
|
#define E0_STEP_PIN 40
|
||||||
|
#define E0_DIR_PIN 41
|
||||||
|
#define E0_ENABLE_PIN 37
|
||||||
|
|
||||||
|
#define SDPOWER -1
|
||||||
|
#define LED_PIN -1 //Use +12V Aux port for LED Ring
|
||||||
|
|
||||||
|
#define FAN_PIN 16 //5V PWM
|
||||||
|
|
||||||
|
#define PS_ON_PIN 10 //Set to -1 if using a manual switch on the PWRSW Connector
|
||||||
|
#define SLEEP_WAKE_PIN 26 //This feature still needs work
|
||||||
|
|
||||||
|
#define HEATER_0_PIN 45 //12V PWM1
|
||||||
|
#define HEATER_1_PIN 46 //12V PWM2
|
||||||
|
#define HEATER_2_PIN 17 //12V PWM3
|
||||||
|
#define HEATER_BED_PIN 44 //DOUBLE 12V PWM
|
||||||
|
#define TEMP_0_PIN 3 //ANALOG NUMBERING
|
||||||
|
#define TEMP_1_PIN 2 //ANALOG NUMBERING
|
||||||
|
#define TEMP_2_PIN 1 //ANALOG NUMBERING
|
||||||
|
#define TEMP_BED_PIN 0 //ANALOG NUMBERING
|
||||||
|
|
||||||
|
#define BEEPER 36
|
||||||
|
|
||||||
|
#define KILL_PIN -1
|
||||||
|
|
||||||
|
// M240 Triggers a camera by emulating a Canon RC-1 Remote
|
||||||
|
// Data from: http://www.doc-diy.net/photo/rc-1_hacked/
|
||||||
|
#define PHOTOGRAPH_PIN 29
|
||||||
|
|
||||||
|
#ifdef RA_CONTROL_PANEL
|
||||||
|
|
||||||
|
#define SDSS 53
|
||||||
|
#define SDCARDDETECT 28
|
||||||
|
|
||||||
|
#define BTN_EN1 14
|
||||||
|
#define BTN_EN2 39
|
||||||
|
#define BTN_ENC 15 //the click
|
||||||
|
|
||||||
|
#define BLEN_C 2
|
||||||
|
#define BLEN_B 1
|
||||||
|
#define BLEN_A 0
|
||||||
|
|
||||||
|
//encoder rotation values
|
||||||
|
#define encrot0 0
|
||||||
|
#define encrot1 2
|
||||||
|
#define encrot2 3
|
||||||
|
#define encrot3 1
|
||||||
|
|
||||||
|
#endif //RA_CONTROL_PANEL
|
||||||
|
|
||||||
|
#ifdef RA_DISCO
|
||||||
|
//variables for which pins the TLC5947 is using
|
||||||
|
#define TLC_CLOCK_PIN 25
|
||||||
|
#define TLC_BLANK_PIN 23
|
||||||
|
#define TLC_XLAT_PIN 22
|
||||||
|
#define TLC_DATA_PIN 24
|
||||||
|
|
||||||
|
//We also need to define pin to port number mapping for the 2560 to match the pins listed above. If you change the TLC pins, update this as well per the 2560 datasheet!
|
||||||
|
//This currently only works with the RA Board.
|
||||||
|
#define TLC_CLOCK_BIT 3 //bit 3 on port A
|
||||||
|
#define TLC_CLOCK_PORT &PORTA //bit 3 on port A
|
||||||
|
|
||||||
|
#define TLC_BLANK_BIT 1 //bit 1 on port A
|
||||||
|
#define TLC_BLANK_PORT &PORTA //bit 1 on port A
|
||||||
|
|
||||||
|
#define TLC_DATA_BIT 2 //bit 2 on port A
|
||||||
|
#define TLC_DATA_PORT &PORTA //bit 2 on port A
|
||||||
|
|
||||||
|
#define TLC_XLAT_BIT 0 //bit 0 on port A
|
||||||
|
#define TLC_XLAT_PORT &PORTA //bit 0 on port A
|
||||||
|
|
||||||
|
//change this to match your situation. Lots of TLCs takes up the arduino SRAM very quickly, so be careful
|
||||||
|
//Leave it at at least 1 if you have enabled RA_LIGHTING
|
||||||
|
//The number of TLC5947 boards chained together for use with the animation, additional ones will repeat the animation on them, but are not individually addressable and mimic those before them. You can leave the default at 2 even if you only have 1 TLC5947 module.
|
||||||
|
#define NUM_TLCS 2
|
||||||
|
|
||||||
|
//These TRANS_ARRAY values let you change the order the LEDs on the lighting modules will animate for chase functions.
|
||||||
|
//Modify them according to your specific situation.
|
||||||
|
//NOTE: the array should be 8 long for every TLC you have. These defaults assume (2) TLCs.
|
||||||
|
#define TRANS_ARRAY {0, 1, 2, 3, 4, 5, 6, 7, 15, 14, 13, 12, 11, 10, 9, 8} //forwards
|
||||||
|
//#define TRANS_ARRAY {7, 6, 5, 4, 3, 2, 1, 0, 8, 9, 10, 11, 12, 13, 14, 15} //backwards
|
||||||
|
#endif //RA_LIGHTING
|
||||||
|
|
||||||
|
|
||||||
|
#endif /* Ra Board */
|
||||||
|
|
||||||
|
|
||||||
/****************************************************************************************
|
/****************************************************************************************
|
||||||
* Gen6 pin assignment
|
* Gen6 pin assignment
|
||||||
*
|
*
|
||||||
@ -1645,3 +1771,6 @@
|
|||||||
_E0_PINS _E1_PINS _E2_PINS \
|
_E0_PINS _E1_PINS _E2_PINS \
|
||||||
analogInputToDigitalPin(TEMP_0_PIN), analogInputToDigitalPin(TEMP_1_PIN), analogInputToDigitalPin(TEMP_2_PIN), analogInputToDigitalPin(TEMP_BED_PIN) }
|
analogInputToDigitalPin(TEMP_0_PIN), analogInputToDigitalPin(TEMP_1_PIN), analogInputToDigitalPin(TEMP_2_PIN), analogInputToDigitalPin(TEMP_BED_PIN) }
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -10,8 +10,13 @@
|
|||||||
#include "LiquidCrystalRus.h"
|
#include "LiquidCrystalRus.h"
|
||||||
#define LCD_CLASS LiquidCrystalRus
|
#define LCD_CLASS LiquidCrystalRus
|
||||||
#else
|
#else
|
||||||
#include <LiquidCrystal.h>
|
#ifdef LCD_I2C_TYPE_PCA8574
|
||||||
#define LCD_CLASS LiquidCrystal
|
#include <LiquidCrystal_I2C.h>
|
||||||
|
#define LCD_CLASS LiquidCrystal_I2C
|
||||||
|
#else
|
||||||
|
#include <LiquidCrystal.h>
|
||||||
|
#define LCD_CLASS LiquidCrystal
|
||||||
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* Custom characters defined in the first 8 characters of the LCD */
|
/* Custom characters defined in the first 8 characters of the LCD */
|
||||||
@ -25,7 +30,12 @@
|
|||||||
#define LCD_STR_CLOCK "\x07"
|
#define LCD_STR_CLOCK "\x07"
|
||||||
#define LCD_STR_ARROW_RIGHT "\x7E" /* from the default character set */
|
#define LCD_STR_ARROW_RIGHT "\x7E" /* from the default character set */
|
||||||
|
|
||||||
LCD_CLASS lcd(LCD_PINS_RS, LCD_PINS_ENABLE, LCD_PINS_D4, LCD_PINS_D5,LCD_PINS_D6,LCD_PINS_D7); //RS,Enable,D4,D5,D6,D7
|
#ifdef LCD_I2C_TYPE_PCA8574
|
||||||
|
LCD_CLASS lcd(LCD_I2C_ADDRESS, LCD_WIDTH, LCD_HEIGHT);
|
||||||
|
#else
|
||||||
|
LCD_CLASS lcd(LCD_PINS_RS, LCD_PINS_ENABLE, LCD_PINS_D4, LCD_PINS_D5,LCD_PINS_D6,LCD_PINS_D7); //RS,Enable,D4,D5,D6,D7
|
||||||
|
#endif
|
||||||
|
|
||||||
static void lcd_implementation_init()
|
static void lcd_implementation_init()
|
||||||
{
|
{
|
||||||
byte bedTemp[8] =
|
byte bedTemp[8] =
|
||||||
@ -111,7 +121,12 @@ static void lcd_implementation_init()
|
|||||||
B00000,
|
B00000,
|
||||||
B00000
|
B00000
|
||||||
}; //thanks Sonny Mounicou
|
}; //thanks Sonny Mounicou
|
||||||
|
#ifdef LCD_I2C_TYPE_PCA8574
|
||||||
|
lcd.init();
|
||||||
|
lcd.backlight();
|
||||||
|
#else
|
||||||
lcd.begin(LCD_WIDTH, LCD_HEIGHT);
|
lcd.begin(LCD_WIDTH, LCD_HEIGHT);
|
||||||
|
#endif
|
||||||
lcd.createChar(LCD_STR_BEDTEMP[0], bedTemp);
|
lcd.createChar(LCD_STR_BEDTEMP[0], bedTemp);
|
||||||
lcd.createChar(LCD_STR_DEGREE[0], degree);
|
lcd.createChar(LCD_STR_DEGREE[0], degree);
|
||||||
lcd.createChar(LCD_STR_THERMOMETER[0], thermometer);
|
lcd.createChar(LCD_STR_THERMOMETER[0], thermometer);
|
||||||
|
Loading…
Reference in New Issue
Block a user