Community Forum
    • Blog
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Register
    • Login

    New Adafruit generic OLED display driver for Raspberry PI

    Scheduled Pinned Locked Moved Blog articles comments
    driver1.30.96i2ciic
    53 Posts 20 Posters 40.8k Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • D Offline
      donde
      last edited by

      Screen Never Lights
      New to OLED. Waiting for SSH1306 1.3" display like on Adafruit website. Sent for SH1106 display instead. Pinouts are left to right: VDD VSS SCK SDA D/C CS1 FS0 CS2
      Using Pi Zero. Went through tutorial OK I think. 2 problems:

      root@raspberrypi:~# ls /dev/i2c*
      /dev/i2c-0
      root@raspberrypi:~# ls /dev/spi*
      /dev/spidev0.0 /dev/spidev0.1

      The first check returned /dev/i2c-1 instead of /dev/i2c-0
      The second response was OK.
      Now I wasn't at root when I did commands, but at user.
      Other problem I had to supply sudo for
      ./oled_demo --verbose --oled 6
      I received this:

      pi@raspberrypi:~/ArduiPi_OLED/examples $ ./oled_demo --verbose --oled 6
      oled_demo v1.1
      -- OLED params --
      Oled is : SH1106 I2C 128x64
      -- Other Stuff --
      verbose is : yes

      bcm2835_init: Unable to open /dev/mem: Permission denied
      pi@raspberrypi:~/ArduiPi_OLED/examples $ sudo ./oled_demo --verbose --oled 6
      oled_demo v1.1
      -- OLED params --
      Oled is : SH1106 I2C 128x64
      -- Other Stuff --
      verbose is : yes

      x: 9y: 0dy: 3
      x: 30y: 0dy: 2
      x: 111y: 0dy: 2
      x: 81y: 0dy: 4
      x: 41y: 0dy: 2
      x: 85y: 0dy: 5
      x: 7y: 0dy: 5
      x: 76y: 0dy: 2
      x: 72y: 0dy: 3
      x: 76y: 0dy: 4

      Nothing on screen!
      I wired it this way from Pi Zero
      Pi 5 volts to Vdd
      Pi GND to Display VSS
      Pi SCL to Display SCK
      Pi SDA to Display SDA
      IO25 to Display FSO

      No ID on Display, just this description:

      Features

      Self-luminous display for backlight
      High resolution: 128 x 64
      Viewing angle: >160 degree
      Supports many control chip: Fully compatible with Arduino, 51 Series, MSP430 Series, STM32 / 2, CSR IC, etc.
      Ultra-low power consumption: full screen lit 0.08W
      Voltage: 3V ~ 5V DC
      Working Temperature: -30 oC ~ 70 oC
      Module Size: 32.0mm x 35.50mm x 4.1mm
      SPI Interface, need 4 IO only.
      Driver IC: SH1106
      

      Package Includes

      1 x 1.3" SPI Serial 128X64 OLED LCD LED Display Module for Arduino UNO R3
      

      Not sure what try next. What turns on screen to see at least something?
      Thanks ... donde

      1 Reply Last reply Reply Quote
      • D Offline
        donde
        last edited by

        I looked closer at box the display came and it said it is for SPI mode. I tried i2C and didn't light up. Then, tried SPI and still no success. Doesn't seem to be a RST pin. I see no pictures of the same pin arrangement on the Net. Looks to be a special display no one knows about. Guess I'll return it and hopefully the SSH1306 will be available soon, Sorry to take up so much room here is this comments section. Moderator, you can delete all I said on first post. donde

        1 Reply Last reply Reply Quote
        • fiveseven808F Offline
          fiveseven808
          last edited by

          I'm wondering if anyone can help me here... so using I2C, this driver works flawlessly! However, using SPI, I can't get my display to do anything (using the pinouts on the site). I know the display sort of works because the adafruit python library displays something (i think something is wrong with my screen). However, there is zero response with SPI.

          Any ideas?

          1 Reply Last reply Reply Quote
          • S Offline
            shiftleftplusone
            last edited by

            hello,
            can you please provide compile/build parameter settings and examples hw to use this lib with Geany, providing system-wide paths to #include the libs from each proprietary source code program located in any different directory?

            1 Reply Last reply Reply Quote
            • S Offline
              shiftleftplusone
              last edited by

              hello,
              you specified the following types:
              0 Adafruit SPI 128x32
              1 Adafruit SPI 128x64
              2 Adafruit I2C 128x32
              3 Adafruit I2C 128x64
              4 Seeed I2C 128x64
              5 Seeed I2C 96x96
              6 SH1106 I2C 128x64

              the chip of the 6th is obvious, but which chip types are especially 1,3, and 4?
              what about the i2c dev addresses of these OLEDs, and how to change them in the code if needed?

              1 Reply Last reply Reply Quote
              • S Offline
                shiftleftplusone
                last edited by

                another question:
                you wrote
                " Added millis() function"

                But millis() is already provided by Gordon Henderson's WiringPi lib which I always use - I'm afraid that will cause interferences and problems. How can one fix that problem?

                1 Reply Last reply Reply Quote
                • S Offline
                  shiftleftplusone
                  last edited by

                  and 3rd,
                  how to optionally the OLEDson i2c-1 or/and on i2c-0 ?

                  1 Reply Last reply Reply Quote
                  • S Offline
                    shiftleftplusone
                    last edited by

                    sorry, typos:
                    and 3rd,
                    how to optionally drive the OLEDs on i2c-1 or/and on i2c-0 ?

                    1 Reply Last reply Reply Quote
                    • T Offline
                      tito
                      last edited by

                      now I'm running into the same issues as the former user:
                      examples are running as sudo from console, but if I load the example source oled_demo.cpp into Geany, it compies, but buils does not work.
                      which are the exact parameters for the library to link to?
                      -I/ArduiPi_OLED ??
                      -L/ArduiPi_OLED ??

                      1 Reply Last reply Reply Quote
                      • CharlesC Offline
                        Charles
                        last edited by

                        It's L of "Library" but in lower case

                        so but I do not know if Geany requires the -l switch before or not so you can try
                        -lArduiPi_OLED or ArduiPi_OLED

                        1 Reply Last reply Reply Quote
                        • T Offline
                          tito
                          last edited by

                          oh yes, a lowercase l (L) seems to work, and no -L is required as it seems, and now it also runs started out of different folders, thank you!

                          • Tim
                          1 Reply Last reply Reply Quote
                          • T Offline
                            tito
                            last edited by

                            now I just have to figure out how to start oled type 6 out of the source code without either command line parameters, just screen-out to this static oled type... will see, thanks again!

                            1 Reply Last reply Reply Quote
                            • T Offline
                              tito
                              last edited by

                              ps, in the source code I also exchanged
                              #include "ArduiPi_OLED_lib.h"
                              #include "Adafruit_GFX.h"
                              #include "ArduiPi_OLED.h"
                              by
                              #include <ArduiPi_OLED_lib.h>
                              #include <Adafruit_GFX.h>
                              #include <ArduiPi_OLED.h>

                              1 Reply Last reply Reply Quote
                              • T Offline
                                tito
                                last edited by

                                no, I don't get it: how to call
                                display.init()
                                in order to force oled 6 (i2c) without using any commandline parametes?

                                1 Reply Last reply Reply Quote
                                • T Offline
                                  tito
                                  last edited by

                                  think I got it:

                                  // Oled supported display in ArduiPi_SSD1306.h
                                  // Get OLED type
                                  //parse_args(argc, argv);

                                  /* 
                                  // SPI
                                  if (display.oled_is_spi_proto(opts.oled))
                                  {
                                  	// SPI change parameters to fit to your LCD
                                  	if ( !display.init(OLED_SPI_DC,OLED_SPI_RESET,OLED_SPI_CS, opts.oled) )
                                  		exit(EXIT_FAILURE);
                                  }
                                  else	
                                  */
                                  
                                  {
                                  	// I2C change parameters to fit to your LCD
                                  	if ( !display.init(OLED_I2C_RESET, 6) )
                                  		exit(EXIT_FAILURE);
                                  }
                                  display.begin();
                                  
                                  1 Reply Last reply Reply Quote
                                  • Y Offline
                                    yanniks
                                    last edited by

                                    Any solution for the problem that the screen is freezing?
                                    The display is working fine with the Python script we found here so that can't be the problem. The Raspberry Pi is a Raspberry Pi 3.

                                    Thank you for your support.

                                    1 Reply Last reply Reply Quote
                                    • T Offline
                                      tito
                                      last edited by

                                      hello,
                                      if I am using your lib in my own programs I always need sudo to start them.
                                      How can I make them executable by every user (e.g., standard user pi) ?

                                      1 Reply Last reply Reply Quote
                                      • S Offline
                                        shyamvnarayanan
                                        last edited by

                                        Hi Charles,

                                        I am looking to use a 128x96 16-bit color OLED for my project using the SSD1351 controller. Could you help me understand

                                        1. What changes would be needed to your 1306 driver to make it work for the SSD1351
                                        2. Would you have some kind of reference code for that ?
                                        3. How would the wiring look like ?

                                        Whatever help/direction you could offer would be much appreciated. I was thinking of trying out your raspberry pi example for 1306 and start making changes from that point. Not sure if thats the right approach or should I go straight to the 1351.

                                        Regards
                                        Shyam

                                        1 Reply Last reply Reply Quote
                                        • D Offline
                                          dennischrist
                                          last edited by

                                          Hi Charles,

                                          is it possible to hook multiple screens up to the Rasberry Pi?

                                          I have 8 SSD 1306 7pin SPI that I would like to hookup.

                                          best,

                                          D

                                          1 Reply Last reply Reply Quote
                                          • S Offline
                                            snapx12
                                            last edited by

                                            Hi,

                                            So as far as I understand, there is no way to use this driver with a SH1106 SPI 128x64 ?
                                            That's a real shame, and I can't find any other rasppi drivers.

                                            If someone could help, that would be great,
                                            Regards

                                            1 Reply Last reply Reply Quote
                                            • First post
                                              Last post

                                            3

                                            Online

                                            5.7k

                                            Users

                                            534

                                            Topics

                                            5.0k

                                            Posts

                                            Top Topics

                                            • Denky 4 - Domoticz - Triphasé -
                                              Nicolas BernaertsN
                                              Nicolas Bernaerts
                                              0
                                              7
                                              249

                                            • Denky D4 et Linky Standard TInfo Rx Non Configuré
                                              CharlesC
                                              Charles
                                              0
                                              5
                                              282

                                            • CC1101
                                              CharlesC
                                              Charles
                                              0
                                              2
                                              117

                                            Popular Tags

                                            teleinfo
                                            24 topics
                                            arduino
                                            19 topics
                                            remora
                                            16 topics
                                            esp8266
                                            10 topics
                                            arduipi
                                            10 topics
                                            wifinfo
                                            7 topics
                                            raspberry
                                            7 topics
                                            broadcast
                                            7 topics
                                            Copyright © 2022 Charles-Henri Hallard | Return to blog page | Powered by NodeBB