SH1106 OLED Display on a Raspberry Pi 4

Поділитися
Вставка
  • Опубліковано 19 жов 2024

КОМЕНТАРІ • 58

  • @UltrasoundJelly
    @UltrasoundJelly Рік тому +1

    Hey, thanks for this. I was about to return my SH1106's to Amazon when I found your video. Sparse documentation from the retailers, even though they say there's RPi support. Saved me lots of time.

    • @TeCoEd
      @TeCoEd  Рік тому

      Glad to help. Same reason I made the video, not much documentation out there.

  • @lungu.v
    @lungu.v Рік тому +1

    Thank you so much for this video! You saved me from the grief caused by the lazy supplier who did not specify in the product description which driver I need to use with this display. Exellent job!

  • @GfastGao
    @GfastGao 3 роки тому +1

    Hey TeCoEd, Super useful vid. My found here is: Don't forget to replace line "device = ssd1306(serial)" with "device = ssh1106(serial)" and the new feature of the Luma library is after the code finished, it will clear the screen, so you may want add "sleep(10)" to see the result if they are really "quick one"

    • @TeCoEd
      @TeCoEd  3 роки тому

      Thanks for the tips. 👍

    • @ViperrKsa
      @ViperrKsa 2 роки тому

      saved my day omg.

  • @brand2309
    @brand2309 3 місяці тому +1

    You're the best!

  • @keithduffield5239
    @keithduffield5239 3 роки тому

    Thank you - I though I was going mad. I now know to look out for chipset info on external products for my PI

    • @TeCoEd
      @TeCoEd  3 роки тому

      I am glad that it helped.

  • @jbauson1
    @jbauson1 5 місяців тому +1

    This is very educational, I thought mine is broken, I was able to power this same Oled in a raspberry pi pico, but for some reason, I can only control the first 10-15 pixel. So maybe I am just using the wrong library in micropython.

    • @TeCoEd
      @TeCoEd  5 місяців тому +1

      Yes most of the time it is the library!

  • @PradeepKumar-ak
    @PradeepKumar-ak 3 роки тому

    Thank you very much, I was using 1306 driver and facing same problem but after watching your video, problem is solved.

    • @TeCoEd
      @TeCoEd  3 роки тому

      Glad that it helped. 👍

    • @PradeepKumar-ak
      @PradeepKumar-ak 3 роки тому

      @@TeCoEd Sir, how to clear the text writen on OLED to write next? Is there any function for clearing text or I need to blackout every pixel to write next?

    • @TeCoEd
      @TeCoEd  3 роки тому

      @@PradeepKumar-ak to clear the screen use clear () this resets all the pixels.

    • @PradeepKumar-ak
      @PradeepKumar-ak 3 роки тому

      @@TeCoEd I had used clear() and an error was produced showing> name 'clear' is not defined

    • @TeCoEd
      @TeCoEd  3 роки тому

      @@PradeepKumar-ak what code are you using for show?

  • @mmolinag
    @mmolinag Рік тому

    Very Great !!! Thanks for helpme !!!

  • @FilmFactry
    @FilmFactry 4 роки тому +1

    Thank you! Got the same screen today. I'm using Micropython.

    • @TeCoEd
      @TeCoEd  4 роки тому

      Did it work?

    • @mobhlog
      @mobhlog 9 місяців тому

      @@TeCoEd Luma works for Python3 (Raspberry Pi 0, 2, 3, 4, 5) but not under MicroPython (Raspberry Pi Pico).
      I tried using the settings under luma.oled.device.__init__.py.sh1106.__init__() in Thonny using MicroPython for the Raspberry Pi Pico, but I still see a scrambled screen on the SH1106 (I'm using SPI, not I2C)

  • @MrPitki
    @MrPitki 3 роки тому

    I had the same issue... also nearly thrown it out. Thanks for the informations!

    • @TeCoEd
      @TeCoEd  3 роки тому

      You are welcome.

  • @immortalsofar5314
    @immortalsofar5314 4 роки тому +1

    Sending video over serial isn't really so good. I figure I'll use an old laptop screen with a driver board. I've got a Pi zero with a camera on the back of my van, a USB-ethernet sending the signal to a Pi4 with the aforementioned display in the cab. The same network is going to have a few lidar detectors attached to Arduinos and I'm working on software to combine the two on-screen.

    • @TeCoEd
      @TeCoEd  4 роки тому

      Let me know how you get on?

    • @immortalsofar5314
      @immortalsofar5314 4 роки тому

      @@TeCoEd Will do. I'll be releasing the software on open source. I got the streams working so that I can have the video as a background and I've just fixed a glitch to auto-program Arduinos as soon as they are connected.

  • @johannesvanschalkwyk304
    @johannesvanschalkwyk304 3 роки тому

    Hi, I went through the same pain on the Raspberry Pi Pico. I'm under the impression that the 1306 driver is for the 0.96" version and the 1106 driver is for the 1.3" version?

  • @Albertosf
    @Albertosf 3 роки тому

    Thank you! You saved my day ;)

    • @TeCoEd
      @TeCoEd  3 роки тому

      You are welcome. 👍

  • @BradMidgley
    @BradMidgley Рік тому

    Can the library detect the correct driver to use? I wanted to write my code so it could work with whatever was plugged in, without changes any time it's changed. I noticed the meshtastic firmware can do this. I changed the 1306 to an 1106 and it just worked.

    • @TeCoEd
      @TeCoEd  Рік тому

      These drivers are for each type of board so they cannot adapt, however if a different board uses the same driver then it will work like a plugged and play!

  • @quiana7019
    @quiana7019 4 місяці тому

    Could i also use this driver for sh1106 on esp32? Without using a arduino ide.. im not aloud to use arduino librarys for school

    • @TeCoEd
      @TeCoEd  4 місяці тому

      Yes you can. Just check you have the correct version as this video is older and there may have been updates since.

  • @anubhabdas3878
    @anubhabdas3878 2 роки тому

    hii, Thanks for this beautiful tutorial. Can you please tell me that by using luma library how I can display real time plot? Is there any function for graph in luma ? Please help me to do this.

    • @TeCoEd
      @TeCoEd  2 роки тому

      Hi. Not aware of a direct plot function but, you can calculate the in matplot and then write the data to the display and loop the code so it updates every 30 seconds or so.

  • @SA-oj3bo
    @SA-oj3bo 3 роки тому

    Hi, I can not open an image with PIL, can you check what is wrong please? I get no errors but not see the image on the monitor and by vnc. When I click on the image it opens and shows normal on the monitor. Thx in advance.
    from PIL import Image, ImageDraw
    im = Image.open("my_photo.jpg")
    im.show()
    input("press enter")

  • @pavolslab7831
    @pavolslab7831 3 роки тому

    it's working, but it's showing the text just for less than a second, then disappear again, any ideas?

    • @TeCoEd
      @TeCoEd  3 роки тому

      Do you want to send the code or a screenshot? May need a pause or wait?

  • @simonevetere9152
    @simonevetere9152 2 роки тому +1

    Sorry It's a black and White screen?

    • @TeCoEd
      @TeCoEd  2 роки тому

      Yes black text on blueish background.

    • @simonevetere9152
      @simonevetere9152 2 роки тому

      Hi thanks for quick response, you know any solution with small screen can be connected with rasberry pi zero (gpio display) like that with color and High resolution , for agumented reality ?

    • @TeCoEd
      @TeCoEd  2 роки тому

      @@simonevetere9152 is this any good? shop.pimoroni.com/products/hyperpixel-4?variant=12569485443155

  • @ElPolloPolloPollo
    @ElPolloPolloPollo 7 місяців тому

    Any idea why the hello world example would appear for a split second and then the screen is black?

    • @TeCoEd
      @TeCoEd  7 місяців тому

      Try adding a pause / sleep at the end of the program. Once the program ends the display is cleared, so this may be why it only displays for a split second.

    • @ElPolloPolloPollo
      @ElPolloPolloPollo 7 місяців тому

      @@TeCoEd thanks for replying! I ended up throwing on a While loop and that did the trick. Without it, I guess it runs as one instance.
      Do you know if there’s any way to use the luma.oled library for the Pico? That’s my end goal. I built my brother a 6 rotary encoder device with the pico and KMK firmware. I’m using the 1.3” sh1106 display for showing different layers to the mapping as well for a general visual layout of where things are. The .96” feels too small. It’s been fun but I was stumped for a while getting the display portion of the project to work until I found your video and plugged the display into the Pi gpio pins to follow your video. After struggling but getting it to work with the pi and luma.oled, I’m now stumped looking for ways to incorporate this library for the pico.
      Would appreciate any thoughts! Thanks again

    • @TeCoEd
      @TeCoEd  7 місяців тому

      @@ElPolloPolloPollo the Pico is programmed with micro Python so if you can find an API library for the display then yes it can run in the Pico.

    • @TeCoEd
      @TeCoEd  7 місяців тому

      Here is a potential post as a reference point. randomnerdtutorials.com/raspberry-pi-pico-ssd1306-oled-micropython/

  • @abiralikhan3299
    @abiralikhan3299 2 роки тому

    can you please provide a code for live scrolling plot using this came luma driver?

    • @TeCoEd
      @TeCoEd  2 роки тому

      Sorry I don't have this code.

  • @charlesbuttner433
    @charlesbuttner433 7 місяців тому

    How can I rotate the display?

    • @TeCoEd
      @TeCoEd  7 місяців тому

      Checkout this guide. luma-oled.readthedocs.io/en/latest/python-usage.html

  • @nrdesign1991
    @nrdesign1991 4 роки тому

    What's with the random loud sounds?

    • @TeCoEd
      @TeCoEd  4 роки тому

      It might be someone in the kitchen next to where I am filming?

    • @nrdesign1991
      @nrdesign1991 4 роки тому

      @@TeCoEd 0:52 and 1:31 someone in the kitchen

    • @TeCoEd
      @TeCoEd  4 роки тому

      @@nrdesign1991 that was a chicken. 🐔

  • @mestrelobao28
    @mestrelobao28 4 роки тому

    where is the code?

    • @TeCoEd
      @TeCoEd  4 роки тому

      In the link in the description. Second link I think.