Download Print this page

Appendix A: App Notes; Using A Ssd1306-Based Oled Graphics Display; Wiring Information; List Of Files - Raspberry Pi Pico Python SDK Manual

A micropython environment for rp2040 microcontrollers

Advertisement

Raspberry Pi Pico Python SDK

Appendix A: App Notes

Using a SSD1306-based OLED graphics display

Display an image and text on I2C driven SSD1306-based OLED graphics display.

Wiring information

See
Figure 8
Figure 8. Wiring the
OLED to Pico using
I2C

List of Files

A list of files with descriptions of their function;
i2c_1306oled_using_defaults.py
The example code.
Pico MicroPython Examples:
 1
# Display Image & text on I2C driven ssd1306 OLED display
 2
from
 3
from
 4
import
 5
 6 WIDTH
 7 HEIGHT =
 8
 9 i2c = I2C(0)
 
SCL=Pin(GP9), SDA=Pin(GP8), freq=400000
10
print("I2C Address
11
print("I2C Configuration:
12
Using a SSD1306-based OLED graphics display
for wiring instructions.
https://github.com/raspberrypi/pico-micropython-examples/tree/master/i2c/1306oled/i2c_1306oled_using_defaults.py
machine
import
Pin, I2C
ssd1306
import
SSD1306_I2C
framebuf
=
128
32
:
"+hex(i2c.scan()[0]).upper())
"+str(i2c))
Lines 1 - 33
# oled display width
# oled display height
# Init I2C using I2C0 defaults,
# Display device address
# Display I2C config
31

Advertisement

loading
Need help?

Need help?

Do you have a question about the Pico Python SDK and is the answer not in the manual?

This manual is also suitable for:

Pico seriesPico 2