Modifications

Sauter à la navigation Sauter à la recherche
526 octets ajoutés ,  17 septembre 2018 à 13:49
Ligne 99 : Ligne 99 :     
[[Fichier:FEATHER-MICROPYTHON-OLED-20a.jpg|320px]]
 
[[Fichier:FEATHER-MICROPYTHON-OLED-20a.jpg|320px]]
 +
 +
==== Pixel ====
 +
Dessiner un pixel se fait à l'aide de ma méthode `pixel`.
 +
 +
<syntaxhighlight lang="python">lcd.fill(0) # Rempli l'écran en noir
 +
# Dessine un pixel en noir
 +
# pixel( x, y, c )
 +
lcd.rect( 3, 4, 1 )
 +
lcd.show()  # Afficher!
 +
</syntaxhighlight>
 +
 +
Il est également possible d'obtenir la couleur d'un pixel avec l'instruction suivante:
 +
 +
<syntaxhighlight lang="python"># Obtenir la couleur d'un pixel
 +
# color = pixel( x, y )
 +
# Retourne 1 si le point est allumé, sinon 0.
 +
c = lcd.rect( 3, 4 )
 +
</syntaxhighlight>
 +
    
==== Rectangle ====
 
==== Rectangle ====
29 918

modifications

Menu de navigation