Texte mit unterschiedlichen Fonts darstellen: Unterschied zwischen den Versionen
Zur Navigation springen
Zur Suche springen
Peter (Diskussion | Beiträge) Die Seite wurde neu angelegt: „== Erster Versuch mit '''micropython-oled''' == https://espresso-ide.readthedocs.io/projects/micropython-oled/en/latest/content/getting_started.html micropython-oled >>> from machine import Pin, I2C >>> from oled import Write, GFX, SSD1306_I2C >>> from oled.fonts import ubuntu_mono_15, ubuntu_mono_20 >>> scl = Pin(17) sda = Pin(16) >>> i2c = I2C(scl=scl, sda=sda) Pin(16, Pin.OUT, value=1) Traceback (most recent call last):…“ |
Peter (Diskussion | Beiträge) |
||
Zeile 2: | Zeile 2: | ||
[[https://espresso-ide.readthedocs.io/projects/micropython-oled/en/latest/content/getting_started.html micropython-oled]] | [[https://espresso-ide.readthedocs.io/projects/micropython-oled/en/latest/content/getting_started.html micropython-oled]] | ||
=== example1.py === | |||
>>> from machine import Pin, I2C | >>> from machine import Pin, I2C |
Version vom 14. März 2023, 22:36 Uhr
Erster Versuch mit micropython-oled
example1.py
>>> from machine import Pin, I2C >>> from oled import Write, GFX, SSD1306_I2C >>> from oled.fonts import ubuntu_mono_15, ubuntu_mono_20 >>> scl = Pin(17) sda = Pin(16) >>> i2c = I2C(scl=scl, sda=sda) Pin(16, Pin.OUT, value=1) Traceback (most recent call last): File "<stdin>", line 1, in <module> TypeError: 'id' argument required >>> i2c = I2C(0, scl=scl, sda=sda) Pin(16, Pin.OUT, value=1) Pin(16, mode=OUT) >>> oled = SSD1306_I2C(128, 64, i2c) gfx = GFX(128, 64, oled.pixel)
Hier hängt sich die REPL auf.