Welcome! Log In Create A New Profile

Advanced

Set up Marlin for I2C OLED SSD1306 w/RAMPS 1.4

Posted by MindRealm 
Set up Marlin for I2C OLED SSD1306 w/RAMPS 1.4
January 15, 2015 02:44PM
Hello all.

I have frustrated myself with a (hopefully) simple problem.

I have one of the tiny OLED displays that is based on SSD1306. It is an I2C 128x64 monochrome unit.



It works great connected to an Arduino UNO (A4 for SDA and A5 for SCL), running very basic sample sketches from the u8glib, but I can't get it to do anything when connected to the I2C pins on the RAMPS 1.4 board.

Do the I2C pins (20 for SDA and 21 for SCL) need to be defined in Marlin? The display is defined in U8glib.h, as below, but not in configuration.h

class U8GLIB_SSD1306_128X64 : public U8GLIB 
{
  public:
    U8GLIB_SSD1306_128X64(uint8_t sck, uint8_t mosi, uint8_t cs, uint8_t a0, uint8_t reset = U8G_PIN_NONE) 
      : U8GLIB(&u8g_dev_ssd1306_128x64_sw_spi, sck, mosi, cs, a0, reset)
      { }
    U8GLIB_SSD1306_128X64(uint8_t cs, uint8_t a0, uint8_t reset = U8G_PIN_NONE) 
      : U8GLIB(&u8g_dev_ssd1306_128x64_hw_spi, cs, a0, reset)
      { }
    U8GLIB_SSD1306_128X64(uint8_t options = U8G_I2C_OPT_NONE) 
      : U8GLIB(&u8g_dev_ssd1306_128x64_i2c, options)
      { }
      
};

In the sample sketches, it references the constructor U8GLIB_SSD1306_128X64 u8g(U8G_I2C_OPT_NO_ACK);

My goal is to use the display to show a status screen like the RepRap Discount Full Graphic Smart Controller, but not use any buttons, SD or beeper.

Any (all) help is greatly appreciated.

Edited 1 time(s). Last edit at 01/15/2015 02:45PM by MindRealm.


-David

Find me online at:
Thingiverse
Instructables.com
LinkedIn
Facebook

Check out my FolgerTech Prusa i3 (plexi) at MindRealm.net
Re: Set up Marlin for I2C OLED SSD1306 w/RAMPS 1.4
January 17, 2015 10:37AM
Although this guy is using the Megatronics 2.0 instead of RAMPS, there might be something there useful for your quest:

Custom controller with SSD1311 I2C OLED
Re: Set up Marlin for I2C OLED SSD1306 w/RAMPS 1.4
January 17, 2015 11:14AM
Thanks NickE - I'll take a look smiling smiley


-David

Find me online at:
Thingiverse
Instructables.com
LinkedIn
Facebook

Check out my FolgerTech Prusa i3 (plexi) at MindRealm.net
Sorry, only registered users may post in this forum.

Click here to login