Added support for OLED SSD1306 I2C based LCDs.

This commit is contained in:
fmalpartida 2015-05-31 18:53:29 +02:00
parent 9c09967803
commit 93da52d011
4 changed files with 18 additions and 1 deletions

View File

@ -42,6 +42,13 @@
#define ENCODER_STEPS_PER_MENU_ITEM 1 #define ENCODER_STEPS_PER_MENU_ITEM 1
#endif #endif
// Generic support for SSD1306 OLED based LCDs.
#if defined(U8GLIB_SSD1306)
#define ULTRA_LCD //general LCD support, also 16x2
#define DOGLCD // Support for I2C LCD 128x64 (Controller SSD1306 graphic Display Family)
#endif
#ifdef PANEL_ONE #ifdef PANEL_ONE
#define SDSUPPORT #define SDSUPPORT
#define ULTIMAKERCONTROLLER #define ULTIMAKERCONTROLLER
@ -199,6 +206,9 @@
#ifdef U8GLIB_ST7920 #ifdef U8GLIB_ST7920
#undef HAS_LCD_CONTRAST #undef HAS_LCD_CONTRAST
#endif #endif
#ifdef U8GLIB_SSD1306
#undef HAS_LCD_CONTRAST
#endif
#endif #endif
#else // CONFIGURATION_LCD #else // CONFIGURATION_LCD

View File

@ -702,6 +702,10 @@ const bool Z_PROBE_ENDSTOP_INVERTING = false; // set to true to invert the logic
// Panucatt VIKI LCD with status LEDs, integrated click & L/R/U/P buttons, separate encoder inputs // Panucatt VIKI LCD with status LEDs, integrated click & L/R/U/P buttons, separate encoder inputs
//#define LCD_I2C_VIKI //#define LCD_I2C_VIKI
// SSD1306 OLED generic display support
// ==> REMEMBER TO INSTALL U8glib to your ARDUINO library folder: http://code.google.com/p/u8glib/wiki/u8glib
//#define U8GLIB_SSD1306
// Shift register panels // Shift register panels
// --------------------- // ---------------------

View File

@ -125,6 +125,9 @@
#elif defined(U8GLIB_LM6059_AF) #elif defined(U8GLIB_LM6059_AF)
// Based on the Adafruit ST7565 (http://www.adafruit.com/products/250) // Based on the Adafruit ST7565 (http://www.adafruit.com/products/250)
U8GLIB_LM6059 u8g(DOGLCD_CS, DOGLCD_A0); U8GLIB_LM6059 u8g(DOGLCD_CS, DOGLCD_A0);
#elif defined U8GLIB_SSD1306
// Generic support for SSD1306 OLED I2C LCDs
U8GLIB_SSD1306_128X64 u8g(U8G_I2C_OPT_NONE);
#else #else
// for regular DOGM128 display with HW-SPI // for regular DOGM128 display with HW-SPI
U8GLIB_DOGM128 u8g(DOGLCD_CS, DOGLCD_A0); // HW-SPI Com: CS, A0 U8GLIB_DOGM128 u8g(DOGLCD_CS, DOGLCD_A0); // HW-SPI Com: CS, A0

View File

@ -79,7 +79,7 @@
#define BTN_ENC 12 #define BTN_ENC 12
#define KILL_PIN 42 // A2 = 42 - teensy = 40 #define KILL_PIN 42 // A2 = 42 - teensy = 40
#define HOME_PIN -1 // A4 = marlin 44 - teensy = 42 #define HOME_PIN 44 // A4 = marlin 44 - teensy = 42
#ifdef NUM_SERVOS #ifdef NUM_SERVOS
#define SERVO0_PIN 41 // In teensy's pin definition for pinMode (in servo.cpp) #define SERVO0_PIN 41 // In teensy's pin definition for pinMode (in servo.cpp)