Menu

Display issues using the LilyGO board

2025-06-13
2025-06-13
  • Bjørn Røgeberg

    I’m getting a strange issue I do not understand. I'm using the original display that comes with the LilyGO.

    I have tested the LilyGO factory example code: https://github.com/Xinyuan-LilyGO/T-Motor/tree/main/Software/example/factory
    The example was built using PlatformIO.

    The display works fine.

    I build the 318 version using PlatformIO, and I can not get the display to work. It just stays black.
    But according to the console output, the display is detected and started. I’ve added multiple debug log messages, and see that the display() and page1() functions are called.

    But, to the funny thing. If I do:

    1. Program the LilyGO with the factory example (and verify the display is working)
    2. Leave the 12V connected
    3. Re-program with the myfocuser2

    The display works! It continues to work (across several resets), but if I disconnect the 12V, it will not work again.

    Is there some initialisation of the display that is not correct?

    All other functions of the myfocuser2 seems to work: Temp sensor, step motor and web interface (wifi connection is stable).

    Best regards,
    Bjørn Røgeberg

     
  • Bjørn Røgeberg

    I did a dirty hack just for test. I added the U8g2 library to the project, included it at the top of the display_lilygo.cpp file, and added these two lines to the LILYGO_DISPLAY::start() function:

    Wire.beginTransmission(_addr);
      if (Wire.endTransmission() != 0) {
        _found = NOT_FOUND;
        return false;
      } else {
        _found = FOUND;
    
        U8G2_SSD1306_64X32_1F_F_HW_I2C u8g2(U8G2_R0, U8X8_PIN_NONE, I2CCLKPIN, I2CDATAPIN);
        u8g2.begin();
    
        Wire.begin(I2CDATAPIN, I2CCLKPIN);
        off();
    

    And that actually does work! Maybe I'll just convert it to using the U8g2 library.

    BjørnR

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.