010 - ESP32 MicroPython: 0.96 OLED in MicroPython

Поделиться
HTML-код
  • Опубликовано: 11 сен 2024
  • In this video, we will learn to connect and use the 0.96 OLED display in MicroPython to ESP32.
    For more details, visit my blog post at:
    techtotinker.c...
    Please do Comment, Like, Share, and Subscribe.
    Thank you,
    George Bantique
    #TechToTinker
    #MicroPython
    #ESP32

Комментарии • 33

  • @ctonew6155
    @ctonew6155 9 месяцев назад

    Thank you after spending an hour online searching how to interface esp32 to Oled display.

  • @mytechnotalent
    @mytechnotalent 4 года назад +1

    Excellent!

  • @user-vd7fh7uk1g
    @user-vd7fh7uk1g 10 месяцев назад

    Brilliant videos,i wonder do you have any recommand library on ssd1315 ?can't find it anywhere

  • @NesbyBone
    @NesbyBone 3 года назад +1

    Great Video George, thank you! One question how many of this display can drive the esp32 or better say in what depend the number of display that we can use a the same time? For instance, can we operate 9 displays at the same time? Thanks again!

    • @TechToTinker
      @TechToTinker  3 года назад +1

      @NesbyBone, the 0.96 oled display can be configured into 2 I2C address. So using this specific oled display you can use 2.
      But if you can find more flexible i2c addressable display, then 9 display is possible. Cheers.

    • @NesbyBone
      @NesbyBone 3 года назад

      @@TechToTinker thanks for clarifying!

  • @MightyTechGuy
    @MightyTechGuy 3 года назад

    Excellent video..

    • @TechToTinker
      @TechToTinker  3 года назад +1

      Thank you @Mighty Tech Guy

    • @MightyTechGuy
      @MightyTechGuy 3 года назад

      @@TechToTinker Hi, the blit function is not working in the library, I copied the ssd1306 library on your blog... but while running its saying that 'fbuf' is not defined. Can you please help me!

    • @TechToTinker
      @TechToTinker  3 года назад +1

      @Mighty Tech Guy, have you assigned a frame buffer in fbuf parameter? You may refer to this article: www.chipperbits.com/article/oled-displays-i2c-micropython/.

    • @MightyTechGuy
      @MightyTechGuy 3 года назад +1

      @@TechToTinker Thanks! I have not initialized fbuf, i will do it and refer this article ✌️

  • @tedlanguagecoordinatorhind1120
    @tedlanguagecoordinatorhind1120 2 года назад

    Great

  • @marinehm
    @marinehm 3 года назад

    Great intro to ssd1306 oled. I was following along and made an error. I noticed the "write over" text was larger. Which; leads me to think I can adjust the text size. I found my error to display what I wanted but cannot recreate the error to make the text bigger. Any suggestions? Also having trouble getting the text to scroll.

    • @TechToTinker
      @TechToTinker  3 года назад

      Hi @Nick Sebring, ssd1306 oled cannot make text font bigger (it's hardcoded with 8x8 pixel each font) but there is a way to that using a custom font. I will release a new video around this week to demonstrate that. Be sure watch it.
      With regards to scroll function, I also can't make it to work. I am thinking a workaround on creating a loop that changes text position every loop iteration before displaying the text. Yeah, Im sure it will work like that.
      Hope this helps, cheers.

    • @marinehm
      @marinehm 3 года назад +1

      Yes, sir. Already subscribed.

    • @TechToTinker
      @TechToTinker  3 года назад

      @@marinehm thank YOU.

    • @TechToTinker
      @TechToTinker  3 года назад

      @Nick Sebring, I just uploaded a new video about custom font. Check example #3 and #4. just change the library imports from sh1106 to ssd1306 and also change the object creation to ssd1306. Hope this helps. Cheers

  • @AXE-gb4cc
    @AXE-gb4cc 3 года назад +1

    Please create a project where ESP32 is used with external cloud.

    • @TechToTinker
      @TechToTinker  3 года назад +2

      Hello @DJ, here it is now: ruclips.net/video/F0WtIg6fRs4/видео.html
      Thank you for your suggestion.

    • @AXE-gb4cc
      @AXE-gb4cc 3 года назад

      @@TechToTinker Thanks for creating

  • @srn6162
    @srn6162 3 года назад

    getting this error
    Traceback (most recent call last):
    File "", line 1, in
    File "ssd1306.py", line 110, in __init__
    File "ssd1306.py", line 36, in __init__
    File "ssd1306.py", line 71, in init_display
    File "ssd1306.py", line 115, in write_cmd
    OSError: [Errno 19] ENODEV

    • @TechToTinker
      @TechToTinker  3 года назад

      @Sr N, seems like your OLED display cannot be found. Try to check the following:
      #1. Connection
      #2. Try scanning the i2c bus:
      import ssd1306
      import machine scl = machine.Pin(22, machine.Pin.OUT, machine.Pin.PULL_UP) sda = machine.Pin(21, machine.Pin.OUT, machine.Pin.PULL_UP) i2c = machine.I2C(scl=scl, sda=sda, freq=400000) oled = ssd1306.SSD1306_I2C(128, 64, i2c)
      i2c.scan()

    • @srn6162
      @srn6162 3 года назад

      @@TechToTinker
      Getting the same error after this line oled = ssd1306.SSD1306_I2C(128, 64, i2c), i tried many times reflashing esp32 but no use

    • @TechToTinker
      @TechToTinker  3 года назад

      @@srn6162 most probably the problem lies in hardware side. Try to make sure SCL and SDA are connected properly. You may also try swapping it or maybe you are using a different oled display that needs different driver/library

    • @TechToTinker
      @TechToTinker  3 года назад

      Code should be like this for the i2c scanner:
      import ssd1306
      import machine
      scl = machine.Pin(22, machine.Pin.OUT, machine.Pin.PULL_UP)
      sda = machine.Pin(21, machine.Pin.OUT, machine.Pin.PULL_UP)
      i2c = machine.I2C(scl=scl, sda=sda, freq=400000)
      oled = ssd1306.SSD1306_I2C(128, 64, i2c)
      i2c.scan()

    • @srn6162
      @srn6162 3 года назад

      i2c.scan() giving empty list []