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
Thank you after spending an hour online searching how to interface esp32 to Oled display.
Excellent!
Thank you Kevin.
Brilliant videos,i wonder do you have any recommand library on ssd1315 ?can't find it anywhere
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!
@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.
@@TechToTinker thanks for clarifying!
Excellent video..
Thank you @Mighty Tech Guy
@@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!
@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/.
@@TechToTinker Thanks! I have not initialized fbuf, i will do it and refer this article ✌️
Great
Thanks. Cheers.
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.
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.
Yes, sir. Already subscribed.
@@marinehm thank YOU.
@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
Please create a project where ESP32 is used with external cloud.
Hello @DJ, here it is now: ruclips.net/video/F0WtIg6fRs4/видео.html
Thank you for your suggestion.
@@TechToTinker Thanks for creating
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
@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()
@@TechToTinker
Getting the same error after this line oled = ssd1306.SSD1306_I2C(128, 64, i2c), i tried many times reflashing esp32 but no use
@@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
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()
i2c.scan() giving empty list []