<jupyter_start><jupyter_text>Pinoutscl is pin 4, sda is pin 5<jupyter_code>!bash
wget https://raw.githubusercontent.com/adafruit/micropython-adafruit-ssd1306/master/ssd1306.py > ssd1306.py
class Oled():
    def __init__(self):
        import machine, ssd1306
        i2c = machine.I2C(scl=machine.Pin(4), sda=machine.Pin(5))
        oled = ssd1306.SSD1306_I2C(128, 64, i2c)
        oled.fill(0)
        oled.show()
        self.oled = oled

    def display(self, msg):
        self.oled.text('MicroPython on', 0, 0)
        self.oled.text('an ESP32 with an', 0, 10)
        self.oled.text('attached SSD1306', 0, 20)
        self.oled.text('OLED display', 0, 30)
        self.oled.show()
        
oled = Oled()
oled.display("jk")
from ssd1306_sr_writer import SSD1306_SR
import roboto_regular
ssd1306 = SSD1306_SR(font=roboto_regular, pin_scl=4, pin_sda=5)
ssd1306.display("jaja")
ssd1306.display("Det var en gang en iskrem som ville ha is..")
from machine import Pin
r = Pin(4, Pin.OUT)
g = Pin(27, Pin.OUT)
b = Pin(15, Pin.OUT)

r.value(1)<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.13644859813084112, 'fraction_numerical': 0.08130841121495327, 'mean_word_length': 3.4074074074074074, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 6, 'https://': 1, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '1', 'dir': 'jupyter-structured-clean-dedup', 'id': '558055', 'license': 'MIT', 'n_tokens_mistral': 493, 'n_tokens_neox': 438, 'n_words': 89, 'path': 'NOTEBOOKS/WEMOS ESP32 OLED.ipynb', 'repo_name': 'SebastianRoll/NDC-MicroPython', 'size': '1070'}