raspberry_pi_pico:micropython:ssd1306
Différences
Ci-dessous, les différences entre deux révisions de la page.
Les deux révisions précédentesRévision précédenteProchaine révision | Révision précédente | ||
raspberry_pi_pico:micropython:ssd1306 [2023/02/27 19:04] – [Module framebuf :] dan | raspberry_pi_pico:micropython:ssd1306 [2023/02/27 20:39] (Version actuelle) – [SSD1306] dan | ||
---|---|---|---|
Ligne 2: | Ligne 2: | ||
Étude réalisée avec afficheur OLED SSD1306 | Étude réalisée avec afficheur OLED SSD1306 | ||
+ | |||
+ | {{ : | ||
+ | |||
===== Branchement : ===== | ===== Branchement : ===== | ||
- | - GND > 0V | + | |
- | - VDD > 3.3V | + | * VDD > 3.3V |
- | - SCK > GP9 | + | * SCK > GP9 |
- | - SDA > GP8 | + | * SDA > GP8 |
Attention à ne pas se fier aux numéros des broches (ici 11 et 12). | Attention à ne pas se fier aux numéros des broches (ici 11 et 12). | ||
Ligne 14: | Ligne 17: | ||
- | ===== Initialisation ===== | + | ===== Initialisation |
<code python> | <code python> | ||
Ligne 40: | Ligne 43: | ||
Dans notre exemple la commande **print** retourne la valeur **[60, 119]** => l' | Dans notre exemple la commande **print** retourne la valeur **[60, 119]** => l' | ||
- | ===== Fonctions ===== | + | ===== Fonctions |
==== show : ==== | ==== show : ==== | ||
Ligne 63: | Ligne 66: | ||
==== Fonctions : ==== | ==== Fonctions : ==== | ||
- | - **blit | + | * **blit** |
- | - **fill :** rempli l' | + | |
- | - **text :** affiche un texte. Mono-police en 8x8 pixels | + | |
- | - **pixel :** affiche un pixel | + | |
- | - **line :** affiche une ligne | + | |
- | - **hline :** affiche une ligne horizontale | + | |
- | - **vline :** trace une ligne verticale | + | |
- | - **rect :** affiche un rectangle vide | + | |
- | - **fill_rect :** affiche un rectangle rempli | + | |
- | - **scroll :** défile le tableau de pixel | + | |
- | ==== Initialisation ==== | + | ==== Initialisation |
<code python> | <code python> | ||
Ligne 191: | Ligne 194: | ||
# Affiche un logo sous forme d un tableau d' | # Affiche un logo sous forme d un tableau d' | ||
buffer = None | buffer = None | ||
- | buffer = bytearray( b' | + | buffer = bytearray( |
+ | b' | ||
+ | b' | ||
+ | b' | ||
+ | b' | ||
) | ) | ||
raspberry_pi_pico/micropython/ssd1306.1677521055.txt.gz · Dernière modification : 2023/02/27 19:04 de dan