Modifications

Sauter à la navigation Sauter à la recherche
Ligne 103 : Ligne 103 :  
{{traduction}}
 
{{traduction}}
   −
The {{fname|x}} and {{fname|y}} variables can be used to control which individual LED the {{fname|set_pixel}} command should change. '''X''' is horizontal and ranges from {{fname|0}} on the left to {{fname|7}} on the right. '''Y''' is vertical and ranges from {{fname|0}} at the top to {{fname|7}} on the bottom. Therefore, an {{fname|x, y}} coordinate of {{fname|0, 0}} is the top left and an {{fname|x, y}} coordinate of {{fname|7, 7}} is the bottom right.
+
Les variables {{fname|x}} et {{fname|y}} peuvent être utilisés pour contrôler individuellement chaque LED avec la commande {{fname|set_pixel}}. '''X''' est l'horizontal dont la valeur va de {{fname|0}} (sur la gauche) à {{fname|7}} (sur la droite). '''Y''' est la vertical dont la valeur va de {{fname|0}} (au dessus) à {{fname|7}} (en bas).
 +
 
 +
Par conséquence, une coordonnée {{fname|x, y}} avec la valeur {{fname|0, 0}} est le coin supérieur, gauche. La coordonnée {{fname|x, y}} avec la valeur {{fname|7, 7}} représente le coin en bas à droite.
    
[[Fichier:RASP-SENSE-HAT-ASTRO-PI-Matrice-11.png]]
 
[[Fichier:RASP-SENSE-HAT-ASTRO-PI-Matrice-11.png]]
   −
You can get a different colour in each corner of the LED matrix. You will need to use the set_pixel command multiple times in your code like this:
+
Vous pouvez avoir différentes couleurs dans chaque coin de la matrice LED. You will need to use the set_pixel command multiple times in your code like this:
    
  <nowiki>from sense_hat import SenseHat
 
  <nowiki>from sense_hat import SenseHat
29 917

modifications

Menu de navigation