SSD1306 I2C Display on DUE

get following error message when compiling (DUE):

C:\Users\ADMIN\AppData\Local\Temp\arduino_build_707175\sketch\ui.cpp.o:(.data.u8g_dev_ssd1306_128x64_i2c+0x8): undefined reference to `u8g_com_null_fn'

collect2.exe: error: ld returned 1 exit status

any idea?

Comments

  • Posts: 0
    Ok, have added that fuction to u8glib_ex.h so hope it compiles now.
  • edited January 26 Posts: 345
    OK,compiles now,works on mega/ramps but not running on DUE, even can´t get original u8glib running on due.
    Think they are using their own I2C routines ?
    3.3V is not the problem (tried with level shifter from 5 ->3.3 on Mega and works)
    Any idea from your side?
  • Posts: 0
    They are surely using own I2C and not our own version which is only used for eeprom. Due has 2 I2C sets of pins, that might be a problem. 
  • Posts: 345
    I know  and both are not working.
    Anyway ,i was just playing around, don´t know if i find the time to search the error
  • Posts: 0
    It works modifying u8glib_ex.h line #846 from
    #if defined(__AVR__)
    to
    #if defined(__AVR__) || defined(__SAM3X8E__)

    My setup: Ultratronics + SSD1306 on alternate i2c port (pins 70-71) + firmware 1.0.0dev
    Hope it helps

  • Posts: 345
    thanks for info, i´ll check if it works on my setup
  • Posts: 345
    so you also changed ui.cpp line 947 from

    u8g_InitI2C(&u8g,&u8g_dev_ssd1306_128x64_i2c,U8G_I2C_OPT_NONE);

    to

    u8g_InitI2C(&u8g,&u8g_dev_ssd1306_128x64_i2c,U8G_I2C_OPT_DEV_1);

    ?

    when keeping device0(pins 20/21)  there seems to be bus problems with I2C eeprom
  • Posts: 0
    Yes, I changed that line also, only for board wiring aesthetic.
    I verified that the display lights up connected on device0 too, but
    I don't have an I2C eeprom.
  • Posts: 345
    Ok, thank you for the hint , so i can use the Display now on pins70/71  , keeping my other I2C peripherals on 20/21.

    may be i´ll play around with that and if i find a solution to have eeprom and Display on one Port I´ll inform you
Sign In or Register to comment.