News How to Use an OLED Display With Raspberry Pi Pico

Aug 7, 2021
1
0
10
0
Hi,
I'm trying to copy your example, but I can't get the oled display to work, I've tried several libraries, including the one you propose, but always in all cases it throws me this error:

The error is thrown at me whenever I try to instantiate the SSD1306_I2C object

This is my simple code

Python:
from machine import Pin, I2C
from time    import sleep_ms
from ssd1306 import SSD1306_I2C

import framebuf

ANCHO = 128
ALTO  = 64

PinSDA  = Pin(0)
PinSCL  = Pin(1)
Address = 0x3C

i2c =I2C(0, sda=PinSDA, scl=PinSCL, freq=400000)
sleep_ms(100)

oled = SSD1306_I2C(ANCHO, ALTO, i2c)
This is the error that it returns to me

Code:
>>> %Run -c $EDITOR_CONTENT
Traceback (most recent call last):
  File "<stdin>", line 17, in <module>
  File "/lib/ssd1306.py", line 110, in __init__
  File "/lib/ssd1306.py", line 36, in __init__
  File "/lib/ssd1306.py", line 73, in init_display
  File "/lib/ssd1306.py", line 101, in show
  File "/lib/ssd1306.py", line 119, in write_data
OSError: [Errno 5] EIO
>>>
Could you help me by indicating what the problem would be?
From already thank you very much
 
Aug 27, 2021
1
0
10
0
I had the same problem and error message. I think there may have been some problem with the ssd1306.py program that was downloaded from PyPl
I had downloaded that program from the micropython website and didn't have an issue.
When I replaced it with the one from PyPl the errors showed up.

My question is how can we enlarge the text?
I want to display temperature and want the 128 x 64 OLED to display 2 large numbers so that it is easier to read.
I'm not sure how to change the font size in this software?
Thanks,
Robin
 
Oct 16, 2021
2
0
10
0
When I try to install the micropython-ssd1306 library I get the following error:

ERROR: Could not find a version that satisfies the requirement micropython-ssd1306
ERROR: No matching distribution found for micropython-ssd1306
Process returned with code 1

any idea on how to fix this?
 

ASK THE COMMUNITY

TRENDING THREADS