Menu

No response from SSD1306 display

Rick Wayne
2024-03-27
2024-12-17
  • Rick Wayne

    Rick Wayne - 2024-03-27

    Apologies if this is a FAQ, I could not find an answer elsewhere. I put together the solderless MyFocuserPro2 and compiled the firmware with the OLED option (OLEDDISPLAY 1 and USE_SSD1306 1 in focuserconfig.h). Got the focuser running (yay!) and the temperature probe working (yaaay!) and at one point the buttons too, though I may have a bad connection now (booo!).

    When I fire up the board, the display* shows nothing. The test program from AdaFruit works fine (e.g. ssd1306_128x64_spi), using the Adafruit_GFX.h and Adafruit_SSD1306.h libraries. Of course including those in the myFP2F firmware exceeds the available memory.

    I have tried setting up another Arduino with nothing but the display attached so that I could triple-check the connections (the actual focuser is a bit of a wiring mare’s nest).

    Any debugging tips? I’m happy to whack chunks out of my firmware if need be, I’ve got buttons, temp probe, and display but that’s it.

    Thanks!

    *Monochrome 0.96" 128x64 OLED Graphic Display according to AdaFruit's product listings

     
  • brownrb

    brownrb - 2024-03-28

    Hi Rick
    When the firmware zip file is extracted, it creates a Tests folder. In that folder there exists
    Oled_test folder and .ino program of same name.

    First, you need to be using an Arduino Nano
    An Oled 128x64 0.96" I2C display
    Arduino IDE version 2.xx is okay

    Things to check:
    1. Did you install the myOLED library foung in the Libraries_To_Install folder
    2. Did you enable the oled display in the focuserconfig.h file?
    3. What is the driver type for the OLED you purchased? Is it SSD1306 or is it SSH1106. Sometimes the link where you purchased the OLED lists which driver chip the display uses. If it uses the SSD1306 driver, then that must also be enabled like

    #define USE_SSD1306 1
    
    1. What is the resolution of the display 128x64? or something else?
    2. Is the header connection on the Display got 4 pins or more pins than 4? The correct type has 4 pins Gnd, 5v or VCC, SDA and SCL. The Gnd wires to the Gnd pin of J7, +5v/Vcc to VCC, SDA to SDA and SCL to SCL
    3. If the display is correctly wired but still not working, find the I2C_scanner program in the Tests folder and upload that program to the Arduino chip. With the display connected, I2C Scanner should display the address of the I2C display as 0x3C. If it is a different address, then u need to change the value in the defines.h file for OLED_ADDR. If the scanner gave a value of 0x3F, then you would change like
    #define OLED_ADDR 0x3F 
    

    and then reprogram the controller
    7. If the scanner does not find any display, then the display is wired incorrectly, the display is damaged, or there is a faulty Arduino chip.
    8. The display is normally disabled. You need to start the Windows app and enable it. Once enabled it will stay enabled, so the next time the controller starts it will be enabled at startup.
    9. Run the Windows app and connect to the controller. Click on the Display tab. Click the Get button to get the values from the controller. Check the Enabled checkbox. Click the Set button to send the new values to the controller. The display should be running.

    regards
    Robert

     
  • Rick Wayne

    Rick Wayne - 2024-03-29

    I'll report back -- excellent debug tips, thanks! I do almost all of my work from a Mac, so I hardly ever run the Windows app. At a guess, suggestion #8 is the key, because I never ran the app to enable it.

    BTW, since I've got you on the line here, you also have my thanks for this wonderful project. Getting all of this firmware crammed onto an Arduino is reminiscent of the first Macintosh OS development effort -- amazing functionality given the hardware limitations! My hat is off to you.

     

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.