Editing OLED LCD Display
Jump to navigation
Jump to search
Warning: You are not logged in. Your IP address will be publicly visible if you make any edits. If you log in or create an account, your edits will be attributed to your username, along with other benefits.
The edit can be undone. Please check the comparison below to verify that this is what you want to do, and then save the changes below to finish undoing the edit.
Latest revision | Your text | ||
Line 13: | Line 13: | ||
= How to control it in MicroPython = | = How to control it in MicroPython = | ||
<syntaxhighlight lang="python" line='line'> | <syntaxhighlight lang="python" line='line'> | ||
− | from machine import Pin, I2C | + | from machine import Pin, I2C |
− | from | + | from ssd1306 import SSD1306_I2C |
− | + | i2c = I2C(scl=Pin(15), sda=Pin(4)) | |
− | + | pin16 = Pin(16, Pin.OUT) | |
− | + | pin16.on() | |
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
oled_width = 128 | oled_width = 128 | ||
Line 94: | Line 86: | ||
[[File:DisplayLinePos.PNG|600px]] | [[File:DisplayLinePos.PNG|600px]] | ||
− | = A small Program in MicroPython | + | = A small Program in MicroPython = |
<syntaxhighlight lang="python" line='line'> | <syntaxhighlight lang="python" line='line'> | ||
− | from machine import Pin, | + | from machine import Pin, I2C |
from ssd1306v03 import SSD1306_I2C | from ssd1306v03 import SSD1306_I2C | ||
− | |||
i2c = SoftI2C(scl=Pin(18), sda=Pin(17)) | i2c = SoftI2C(scl=Pin(18), sda=Pin(17)) |