Tiny OLED I2C + RADDS 1.5 + Marlin4Due 07. January 2016 20:14 |
Registrierungsdatum: 13 Jahre zuvor Beiträge: 256 |
#if ENABLED(SERVO_ENDSTOPS) || ENABLED(Z_PROBE_ALLEN_KEY) || ENABLED(Z_PROBE_SLED)Richtig wäre:
#if defined(SERVO_ENDSTOPS) || ENABLED(Z_PROBE_ALLEN_KEY) || ENABLED(Z_PROBE_SLED)
#define U8GLIB_SSD1306Benötigte Libs hatte ich schon installiert.
#ifdef ULTRA_LCD // RADDS LCD panel #ifdef NEWPANEL #ifdef RADDS_DISPLAY #define LCD_PINS_RS 42 #define LCD_PINS_ENABLE 43 #define LCD_PINS_D4 44 #define LCD_PINS_D5 45 #define LCD_PINS_D6 46 #define LCD_PINS_D7 47 #define BEEPER 41 #define BTN_EN1 50 #define BTN_EN2 52 #define BTN_ENC 48 #define BTN_BACK 71 #undef SDSS #define SDSS 10 #define SDCARDDETECT 14 #elif defined(SSD1306_OLED_I2C_CONTROLLER) #define BTN_EN1 50 #define BTN_EN2 52 #define BTN_ENC 48 #define BEEPER 41 #define LCD_SDSS 10 #define SDCARDDETECT 14 #define KILL_PIN -1 // Sparklabs Full Graphic Display for RADDS #elif defined(SPARK_FULL_GRAPHICS) #define LCD_PINS_D4 29 #define LCD_PINS_ENABLE 27 #define LCD_PINS_RS 25 #define BTN_EN1 35 #define BTN_EN2 33 #define BTN_ENC 37 #define KILL_PIN -1 #undef BEEPER #define BEEPER -1 #endif // SPARK_FULL_GRAPHICS #endif #endif //ULTRA_LCD
#if defined(U8GLIB_SSD1306) #define ULTRA_LCD //general LCD support, also 16x2 #define DOGLCD // Support for I2C LCD 128x64 (Controller SSD1306 graphic Display Family) #endifhabe ich einfach mal folgendes hinzugefügt
#define NEWPANEL #define SSD1306_OLED_I2C_CONTROLLER
Re: Tiny OLED I2C + RADDS 1.5 + Marlin4Due 08. January 2016 01:50 |
Registrierungsdatum: 10 Jahre zuvor Beiträge: 590 |
Re: Tiny OLED I2C + RADDS 1.5 + Marlin4Due 08. January 2016 06:13 |
Registrierungsdatum: 9 Jahre zuvor Beiträge: 126 |
Re: Tiny OLED I2C + RADDS 1.5 + Marlin4Due 08. January 2016 07:23 |
Registrierungsdatum: 13 Jahre zuvor Beiträge: 256 |
Re: Tiny OLED I2C + RADDS 1.5 + Marlin4Due 08. January 2016 07:34 |
Registrierungsdatum: 13 Jahre zuvor Beiträge: 256 |
Re: Tiny OLED I2C + RADDS 1.5 + Marlin4Due 08. January 2016 10:50 |
Registrierungsdatum: 13 Jahre zuvor Beiträge: 256 |
Re: Tiny OLED I2C + RADDS 1.5 + Marlin4Due 09. January 2016 10:36 |
Registrierungsdatum: 10 Jahre zuvor Beiträge: 4.977 |
Triffid Hunter's Calibration Guide | --> X <-- Drill for new Monitor | Most important Gcode. |
Re: Tiny OLED I2C + RADDS 1.5 + Marlin4Due 10. January 2016 07:13 |
Registrierungsdatum: 13 Jahre zuvor Beiträge: 256 |
Re: Tiny OLED I2C + RADDS 1.5 + Marlin4Due 14. January 2016 02:24 |
Registrierungsdatum: 10 Jahre zuvor Beiträge: 100 |
Re: Tiny OLED I2C + RADDS 1.5 + Marlin4Due 14. January 2016 02:26 |
Registrierungsdatum: 10 Jahre zuvor Beiträge: 100 |
Re: Tiny OLED I2C + RADDS 1.5 + Marlin4Due 14. January 2016 04:19 |
Registrierungsdatum: 13 Jahre zuvor Beiträge: 256 |
Re: Tiny OLED I2C + RADDS 1.5 + Marlin4Due 14. January 2016 04:36 |
Registrierungsdatum: 13 Jahre zuvor Beiträge: 256 |
Quote
Enif
As for the I2C problem on the Arduino Due that caused some conflict when activating simultaneously the I2C OLED (using the U8glib I2C routines) and the I2C EEPROM (using Arduino's Wire.h), I have made some progress:
I removed the '//' from the (3 each) commented out statements "//u8g->pin_list[U8G_PI_SET_A0] = 1;" and "// u8g_i2c_stop();" in file U8glib/utility/u8g_com_arduino_ssd_i2c.c :
$diff u8g_com_arduino_ssd_i2c.c.ori u8g_com_arduino_ssd_i2c.c 125c125 < //u8g->pin_list[U8G_PI_SET_A0] = 1; --- > u8g->pin_list[U8G_PI_SET_A0] = 1; 130c130 < // u8g_i2c_stop(); --- > u8g_i2c_stop(); 134c134 < //u8g->pin_list[U8G_PI_SET_A0] = 1; --- > u8g->pin_list[U8G_PI_SET_A0] = 1; 146c146 < // u8g_i2c_stop(); --- > u8g_i2c_stop(); 150c150 < //u8g->pin_list[U8G_PI_SET_A0] = 1; --- > u8g->pin_list[U8G_PI_SET_A0] = 1; 163c163 < // u8g_i2c_stop(); --- > u8g_i2c_stop();
Quote
Enif
Essentially I had just to add some Wire.begin() statements to reinitialize the I2C lines in ConfigurationStore.cpp where the EEPROM is read and written
Re: Tiny OLED I2C + RADDS 1.5 + Marlin4Due 14. January 2016 04:42 |
Registrierungsdatum: 13 Jahre zuvor Beiträge: 256 |
void _EEPROM_writeData(int &pos, uint8_t* value, uint8_t size) { uint8_t c; while(size--) { eeprom_write_byte((unsigned char*)pos, *value); _delay_ms(2); c = eeprom_read_byte((unsigned char*)pos); if (c != *value) { SERIAL_ECHO_START; SERIAL_ECHOLNPGM(MSG_ERR_EEPROM_WRITE); } pos++; value++; }; } void _EEPROM_readData(int &pos, uint8_t* value, uint8_t size) { do { *value = eeprom_read_byte((unsigned char*)pos); pos++; value++; } while (--size); }
Re: Tiny OLED I2C + RADDS 1.5 + Marlin4Due 14. January 2016 05:47 |
Registrierungsdatum: 10 Jahre zuvor Beiträge: 590 |
--- ConfigurationStore.cpp.ori 2015-04-24 14:44:41.000000000 +0200 +++ ConfigurationStore.cpp 2016-01-14 11:29:17.421633493 +0100 @@ -99,6 +99,9 @@ #include "mesh_bed_leveling.h" #endif // MESH_BED_LEVELING + +#include < Wire.h> // I2C library ( + void _EEPROM_writeData(int &pos, uint8_t* value, uint8_t size) { uint8_t c; while(size--) { @@ -120,6 +123,7 @@ value++; } while (--size); } + #define EEPROM_WRITE_VAR(pos, value) _EEPROM_writeData(pos, (uint8_t*)&value, sizeof(value)) #define EEPROM_READ_VAR(pos, value) _EEPROM_readData(pos, (uint8_t*)&value, sizeof(value)) @@ -135,6 +139,7 @@ float dummy = 0.0f; char ver[4] = "000"; int i = EEPROM_OFFSET; + Wire.begin(); EEPROM_WRITE_VAR(i, ver); // invalidate data first EEPROM_WRITE_VAR(i, axis_steps_per_unit); EEPROM_WRITE_VAR(i, max_feedrate); @@ -289,6 +294,7 @@ void Config_RetrieveSettings() { + Wire.begin(); int i = EEPROM_OFFSET; char stored_ver[4]; char ver[4] = EEPROM_VERSION;
Re: Tiny OLED I2C + RADDS 1.5 + Marlin4Due 14. January 2016 07:39 |
Registrierungsdatum: 13 Jahre zuvor Beiträge: 256 |
Re: Tiny OLED I2C + RADDS 1.5 + Marlin4Due 14. January 2016 15:24 |
Registrierungsdatum: 13 Jahre zuvor Beiträge: 256 |
Re: Tiny OLED I2C + RADDS 1.5 + Marlin4Due 15. January 2016 02:03 |
Registrierungsdatum: 10 Jahre zuvor Beiträge: 4.977 |
Triffid Hunter's Calibration Guide | --> X <-- Drill for new Monitor | Most important Gcode. |
Re: Tiny OLED I2C + RADDS 1.5 + Marlin4Due 15. January 2016 05:20 |
Registrierungsdatum: 13 Jahre zuvor Beiträge: 256 |
Re: Tiny OLED I2C + RADDS 1.5 + Marlin4Due 23. January 2016 12:36 |
Registrierungsdatum: 13 Jahre zuvor Beiträge: 256 |
// SH1106 OLED generic display support // ==> REMEMBER TO INSTALL U8glib to your ARDUINO library folder: [code.google.com] //#define U8GLIB_SH1106am besten direkt nach:
// SSD1306 OLED generic display support // ==> REMEMBER TO INSTALL U8glib to your ARDUINO library folder: [code.google.com] //#define U8GLIB_SSD1306