Modifications

Sauter à la navigation Sauter à la recherche
723 octets ajoutés ,  17 septembre 2018 à 11:15
Ligne 144 : Ligne 144 :     
[[Fichier:FEATHER-MICROPYTHON-OLED-20d.jpg|320px]]
 
[[Fichier:FEATHER-MICROPYTHON-OLED-20d.jpg|320px]]
 +
 +
==== Afficher du texte ====
 +
La bibliothèque embarque une font permettant l'affichage de texte.
 +
 +
<syntaxhighlight lang="python">
 +
lcd.fill(0) # Rempli l'écran en noir
 +
# Dessine du texte en blanc.
 +
#  text( str, x,y, c )
 +
lcd.text("Bonjour!", 0,0, 1 )
 +
lcd.show()  # Afficher!
 +
</syntaxhighlight>
 +
 +
[[Fichier:FEATHER-MICROPYTHON-OLED-20e.jpg|320px]]
 +
 +
Il est également possible de réaliser un bel effet visuel en décalant le texte affiché!
 +
 +
<syntaxhighlight lang="python">
 +
lcd.fill(0) # Rempli l'écran en noir
 +
lcd.text( "Bonjour!", 0,0, 1 ) # blanc
 +
lcd.text( "Bonjour!", 1,1, 0 ) # noir
 +
lcd.text( "Bonjour!", 2,2, 1 ) # blanc
 +
lcd.show()  # Afficher!
 +
</syntaxhighlight>
 +
 +
[[Fichier:FEATHER-MICROPYTHON-OLED-20f.jpg|320px]]
    
== 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) }}
29 917

modifications

Menu de navigation