Quantcast
Channel: Raspberry Pi Forums
Viewing all articles
Browse latest Browse all 8082

MicroPython • Re: Annoying Display

$
0
0
I have a Raspberry Pi Pico, I also have that basic yellow/blue oled display. I am trying to connect the display but it is not working. 3 weeks ago it was working fine but now it isn't. PLEASE HELP!

from machine import Pin, I2C
from ssd1306 import SSD1306_I2C
import time
WIDTH =128
HEIGHT= 64
i2c=I2C(0,sda=Pin(0), scl=Pin(1), freq=400000)
oled = SSD1306_I2C(128, 64, i2c)


while True:
oled.fill(0)
oled.text('Nubs', 0, 0)
oled.rect (50,35,10,10,1)
oled.rect (50,45,5,10,1)
oled.rect (55,45,5,10,1)
oled.rect (65,40,5,5,1)
oled.rect (40,40,5,5,1)
oled.hline (50,22,10,1)
oled.vline (49,23,10,1)
oled.vline (60,23,10,1)
oled.hline (50,33,10,1)
oled.rect (52,28,2,2,1)
oled.rect (56,28,2,2,1)
oled.show()


This is my feedback:
MPY: soft reboot
Traceback (most recent call last):
File "<stdin>", line 7, in <module>
File "/lib/ssd1306.py", line 119, in __init__
File "/lib/ssd1306.py", line 38, in __init__
File "/lib/ssd1306.py", line 75, in init_display
File "/lib/ssd1306.py", line 124, in write_cmd
OSError: [Errno 110] ETIMEDOUT


My initial suspicion is that something has moved and your display is no longer correctly connected to the Pico.

A basic Pico does not have header pins for connecting other components: how are you making the physical connections?



It won't help fix a broken connection, but the following may be significant for future code-related problems -

Python ( and MicroPython ) code relies on indentation (left-hand white space) for its syntax. The forum software provides [ _Code_ ] tag markup to preserve indentation. This is found on the fifth 'button' from the left at the top of the message entry screen. You can - and should - retrospectively correct your posting.

The [ PREVIEW ] button is useful for checking the presentation of your post.

Statistics: Posted by B.Goode — Tue Sep 23, 2025 6:52 am



Viewing all articles
Browse latest Browse all 8082

Trending Articles