Ligne 3 : |
Ligne 3 : |
| | | |
| Ce tutoriel couvre plusieurs modèles de cartes sous MicroPython: | | Ce tutoriel couvre plusieurs modèles de cartes sous MicroPython: |
− | * {{pl|846|Feather ESP8266}} + {{pl|879|OLED FeatherWing}} | + | * {{pl|846|Feather ESP8266}} + {{pl|879|OLED FeatherWing}} <br />[[Fichier:FEATHER-MICROPYTHON-OLED-10a.png|120px]] |
| | | |
| == Installer la bibliothèque == | | == Installer la bibliothèque == |
Ligne 41 : |
Ligne 41 : |
| == Brancher == | | == Brancher == |
| === OLED Featherwing === | | === OLED Featherwing === |
− | Le FeatherWing OLED s'insère simplement sur la carte Feather (ex: Feather ESP8266) et propose une résolution de 128 x 32 pixels. | + | Le {{pl|879|FeatherWing OLED}} s'insère simplement sur la carte Feather (ex: Feather ESP8266) et propose une résolution de 128 x 32 pixels. |
| | | |
| [[Fichier:FEATHER-MICROPYTHON-OLED-10a.png|200px]] [[Fichier:FEATHER-MICROPYTHON-OLED-10b.png]] | | [[Fichier:FEATHER-MICROPYTHON-OLED-10a.png|200px]] [[Fichier:FEATHER-MICROPYTHON-OLED-10b.png]] |
Ligne 76 : |
Ligne 76 : |
| </syntaxhighlight> | | </syntaxhighlight> |
| | | |
− | === Tester lcd === | + | === Tester la bibliothèque === |
| Dans les exemples ci-dessous, voici les paramètres que vous retrouverez dans les différents appels de fonction: | | Dans les exemples ci-dessous, voici les paramètres que vous retrouverez dans les différents appels de fonction: |
| | | |
Ligne 115 : |
Ligne 115 : |
| # color = pixel( x, y ) | | # color = pixel( x, y ) |
| # Retourne 1 si le point est allumé, sinon 0. | | # Retourne 1 si le point est allumé, sinon 0. |
− | c = lcd.rect( 3, 4 ) | + | c = lcd.pixel( 3, 4 ) |
| </syntaxhighlight> | | </syntaxhighlight> |
| | | |
Ligne 272 : |
Ligne 272 : |
| # Affichage d'une icône avec Canal Alpha. | | # Affichage d'une icône avec Canal Alpha. |
| | | |
− | <syntaxhighlight lang="python">cat icon.py | + | <syntaxhighlight lang="python">from machine import Pin, I2C |
− | from machine import Pin, I2C | |
| import time | | import time |
| i2c = I2C( sda=Pin(4), scl=Pin(5) ) | | i2c = I2C( sda=Pin(4), scl=Pin(5) ) |
Ligne 370 : |
Ligne 369 : |
| | | |
| [[Fichier:FEATHER-MICROPYTHON-OLED-20l.jpg|320px]] | | [[Fichier:FEATHER-MICROPYTHON-OLED-20l.jpg|320px]] |
| + | |
| + | == Plus de ressources == |
| + | * [https://github.com/micropython/micropython/tree/master/drivers/display Pilotes d'afficheurs sur le GitHub MicroPython] |
| + | * [https://www.pymadethis.com/article/oled-displays-i2c-micropython/ Article PyMadeThis sur écran OLED ssd1603] |
| + | * [https://www.pymadethis.com/article/displaying-images-oled-displays/ Article PyMadeThis sur affichage d'image 2 couleurs] |
| | | |
| == Où acheter == | | == Où acheter == |
| * {{pl|846|Feather ESP8266}} | | * {{pl|846|Feather ESP8266}} |
| * {{pl|879|OLED FeatherWing 128x32 Pixels (ADA-2900) }} | | * {{pl|879|OLED FeatherWing 128x32 Pixels (ADA-2900) }} |