Raspberry Pi Pico Tutorial - SSD1306 I2C OLED DISPLAY

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

КОМЕНТАРІ • 59

  • @NerdCaveYT
    @NerdCaveYT  2 роки тому +10

    A tiny mistake in the schematic of the ground wire that is in wrong rail.

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

      Yes just to elaborate for any other users. be sure to connect the red (positive) wire to the top power rail on the breadboard. as shown on the breadboard section.
      ua-cam.com/video/Ts9JXbMvfTQ/v-deo.html

    • @tubeDude48
      @tubeDude48 Рік тому +2

      Just to clarify, it's the black wire on the left-side; move UP 1 pin. At 1:20 it's correct.

  • @jasonsammons9
    @jasonsammons9 Рік тому +3

    Excellent, in-depth but brief, tutorial.

  • @TheNicoanthony
    @TheNicoanthony 5 місяців тому

    Really awesome video. Easy to follow and execute. Thanks heaps

  • @Kris-cd9qs
    @Kris-cd9qs Рік тому +1

    Thank you again! Very usefull links👍

  • @lorisrobots
    @lorisrobots Рік тому +2

    Excellent Video.

  • @MacaroonL
    @MacaroonL 2 роки тому +2

    Thank you!!! This was super helpful!

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

    Nice video, thank you.

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

    Very cool, Thank you!

  • @abba2938
    @abba2938 8 місяців тому

    Great Tutorial again! I´ve learned so much from you so far.
    Is it possible tu run the animation only one time, not in a loop?

    • @NerdCaveYT
      @NerdCaveYT  8 місяців тому

      Yes you can! just make a function for it, then you can call that function where you need it to be displayed

    • @abba2938
      @abba2938 8 місяців тому

      Thank you i´ll try it! @@NerdCaveYT

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

    Very Useful!

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

    Great video, I have been struggling to get this Oled to work. I always get static noise and rapidly scrolling text on the first top lines? I2C scan works fine and I get the correct address back (0x3C).
    I also soldered the wires to make sure I get good connections but problem stays :-( any thoughts?
    Note: I run below small code on Pico with v1.19 because I don't have the temp sensor, also Pico with v1.20 gives me a bunch of errors when running the code:
    from machine import Pin, I2C
    from ssd1306 import SSD1306_I2C
    import framebuf
    import time
    WIDTH = 128
    HEIGHT = 64
    i2c = I2C(0, scl = Pin(17), sda = Pin(16), freq=100000)
    display = SSD1306_I2C(128, 64, i2c)
    # display.invert(1)
    #display.contrast(100)
    while True:
    display.text('Text 1...' ,0 ,0)
    display.text('Text 2...' ,0 ,14)
    display.show()
    display.fill(0)

    • @NerdCaveYT
      @NerdCaveYT  11 місяців тому

      sorry for the late reply what errors do you get?

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

    Thank u

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

      No problem, glad it was useful

  • @vvorldnewsmedia
    @vvorldnewsmedia 10 місяців тому

    Is there a way to do this with Arduino? Thanks for the info my friend.

    • @NerdCaveYT
      @NerdCaveYT  10 місяців тому

      Yes you should be able to should be easy using the Adafruit GFX library, I remember seeing a tutorial on it

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

    Merci !!! 👍

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

    It doesn't work differently than ESP32 if you take the USB power and reconnect it. Do I have to keep uploading it every time I do it? How does it work on batteries?

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

      on the raspberry pi pico you upload it to main.py I assume the esp32 will have a boot.py so you don't have to keep uploading it and also a V-in for battery power supply. I am planning on covering the esp32 later this year

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

    Can i do it for normal photo like of any pic ??

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

      well you can, but the quality would not be super great, I think in video there is one of Elon musk, but due to the limited resolution it will be almost a silhouette

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

      @@NerdCaveYT ohh okay

  • @Banana-ko8we
    @Banana-ko8we Рік тому

    Theres an error i keep on getting. Any know on how to fix? Ill paste the whole message below
    Traceback (most recent call last):
    File "", line 11, in
    File "ssd1306.py", line 117, in __init__
    File "ssd1306.py", line 36, in __init__
    File "ssd1306.py", line 73, in init_display
    File "ssd1306.py", line 122, in write_cmd
    OSError: [Errno 5] EIO

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

      It seems to be a connection error you SSD1306 is the pinout the same as the one I used in the video I know there are different modules

  • @ccc5226
    @ccc5226 15 днів тому

    how many frames per second ?

    • @NerdCaveYT
      @NerdCaveYT  11 днів тому

      No idea, then not test it in that detail

  • @pedrocabrera9041
    @pedrocabrera9041 11 місяців тому

    Why did you eliminated the transcripts options?

    • @NerdCaveYT
      @NerdCaveYT  11 місяців тому

      I have not removed the transcript option from video, it might be UA-cam UI or browser causing it not to be seen.

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

    my temperature is displaying too low do u know a fix

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

      Is all the calculation correct as shown the factor that you need to multiply with

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

    How do i run the code?

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

      I am unsure in context of what, you mean the IDE used in the video?

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

      yes @@NerdCaveYT

  • @RepeatVR
    @RepeatVR 18 днів тому +1

    diddnt work got the error
    Traceback (most recent call last):
    File "", line 9, in
    File "/lib/ssd1306.py", line 118, in __init__
    File "/lib/ssd1306.py", line 37, in __init__
    File "/lib/ssd1306.py", line 74, in init_display
    File "/lib/ssd1306.py", line 123, in write_cmd
    OSError: [Errno 5] EIO

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

    Are you able to collaborate? I have a project I’m working on an I’m a newbie

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

      Collaborate on what project?

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

    Hello thanks for the tutorial. I got the first part with temperature correct. The last animation tutorial gave me an error. Could you tell me what I have done wrong?
    MicroPython v1.19.1 on 2022-06-18; Raspberry Pi Pico with RP2040
    Type "help()" for more information.
    >>> %Run -c $EDITOR_CONTENT
    Traceback (most recent call last):
    File "", line 15, in
    OSError: [Errno 2] ENOENT
    >>>

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

      What is line 15 it is giving the error

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

      @@NerdCaveYT with open('/minecraft/image%s.pbm' % n, 'rb') as f: #open folder and image

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

      @@NerdCaveYT thanks for the response. I got it working. I think it was something to do with the image numbering, also had to change some settings in EZgif. But it works!

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

      @@alexfernandesportrai I think there are other methods as well I just used one I found on a blog, but some people wrote programs go to do it

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

      Same
      ):

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

    bad tutorial does not show how to even code

    • @NerdCaveYT
      @NerdCaveYT  Рік тому +5

      did you even watch the video? You are more then welcome making a better video and I can share it to the community :) Have a nice day

  • @jjaosopica
    @jjaosopica Місяць тому

    the library doesnt save. i tried to do everything to the point where i even bough a new pico and used another usb cable. but still this error popped up:
    Could not write next block after having written 0 bytes to /ssd1306.py
    PROBLEM IN THONNY'S BACK-END: Exception while handling 'write_file' (OSError: [WinError Traceback (most recent call last):
    File "", line 1, in
    File "", line 4, in __W
    OSError: 28
    ] __W(b'# MicroPython SSD1306 OLED driver, I2C and SPI interfaces

    from micropython import const
    import framebuf


    # register definitions
    SET_CONTRAST = const(0x81)
    SET_ENTIRE_ON = const(0xA4)
    SET_NORM_INV = const(0xA6)
    SET_DISP = const(0xAE)
    SET_MEM_ADDR = const(0x20)
    SET_COL_ADDR = const(0x21)
    SET_PAGE_ADDR = const(0x22)
    SET_DISP_START_LINE = const(0x40)
    SET_SEG_REMAP = const(0xA0)
    SET_MUX_RATIO = const(0xA8)
    SET_IREF_SELECT = const(0xAD)
    SET_COM_OUT_DIR = const(0xC0)
    SET_DISP_OFFSET = const(0xD3)
    SET_COM_PIN_CFG = const(0xDA)
    SET_DISP_CLK_DIV = const(0xD5)
    SET_PRECHARGE = const(0xD9)
    SET_VCOM_DESEL = const(0xDB)
    SET_CHARGE_PUMP = const(0x8D)

    # Subclassing FrameBuffer provides support for graphics primitives
    # docs.micropython.org/en/latest/pyboard/library/framebuf.html
    class SSD1306(framebuf.FrameBuffer):
    def __init__(self, width, height, external_vcc):
    self.width = width
    self.height = height
    self.external_vcc = external_vcc
    self.pages = '): '').
    See Thonny's backend.log for more info.
    You may need to press "Stop/Restart" or hard-reset your MicroPython device and try again.
    Process ended with exit code 1.
    pls help somoewne

    • @NerdCaveYT
      @NerdCaveYT  Місяць тому

      How did you try to save the library, you just copy the code library code from github and paste it in a new file and save it to the pico as ssd1306.py and then in another file you will have from ssd1306 import SSD1306_I2C and this will import the library

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

    the links are correct the code is correct but i am getting error like this. Sometimes it gives an error saying no module named 'ssd1306', can you help me?
    ♦Traceback (most recent call last):
    File "", line 9, in
    File "ssd1306.py", line 116, in __init__
    File "ssd1306.py", line 35, in __init__
    File "ssd1306.py", line 72, in init_display
    File "ssd1306.py", line 121, in write_cmd
    OSError: [Errno 5] EIO

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

      you are only getting the error sometimes right, usually a bad connection has given me this error before