Skip to content
Discussion options

You must be logged in to vote

Here's the complete code, including the required reset line activation, to make the OLED on the S2 Pico work:

# for Wemos S2 Pico SSD1306 128x32 display
# https://www.wemos.cc/en/latest/s2/s2_pico.html
# scruss, 2023-02

from machine import Pin, I2C
import ssd1306

# ensure display reset is held high, otherwise nothing will work
oled_reset = Pin(18, Pin.OUT, value=1)
# ESP32 S2 only has one hardware I2C channel, #0 on pins 8 & 9
i2c = I2C(0, sda=Pin(8), scl=Pin(9))
# use default address 0x3C (60) for SSD1306
display = ssd1306.SSD1306_I2C(128, 32, i2c)
display.fill(0)
display.text("* Hello from *", 0, 0, 1)
display.text("*  S2 Pico   *", 0, 8, 1)
display.show()

Replies: 5 comments 5 replies

Comment options

You must be logged in to vote
2 replies
@dnguyen76
Comment options

@scruss
Comment options

scruss Mar 24, 2023
Author Sponsor

Answer selected by scruss
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
3 replies
@scruss
Comment options

scruss Jun 2, 2023
Author Sponsor

@PBrunot
Comment options

@frazzmatazz
Comment options

Comment options

scruss
Jun 2, 2023
Author Sponsor

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
5 participants