Modifications

Sauter à la navigation Sauter à la recherche
127 octets ajoutés ,  23 février 2015 à 20:53
Ligne 74 : Ligne 74 :  
         l.off()</nowiki>
 
         l.off()</nowiki>
   −
== Les 4 LEDs spéciales ==
+
== La LED 4 est spéciales ==
The blue LED is special. As well as turning it on and off, you can control the intensity using the intensity() method. This takes a number between 0 and 255 that determines how bright it is. The following script makes the blue LED gradually brighter then turns it off again.
+
La LED bleue est spéciale. En plus de pouvoir l'allumer et l'éteindre, vous pouvez controler sont intensité en utilisant la méthode {{fname|intensity()}}. Cette méthode accepte un nombre entre 0 et 255 qui détermine sa luminosité. Le script suivant fait en sorte d'allumer la LED bleue graduellement puis l’éteint pour recommencer.
    
  <nowiki>led = pyb.LED(4)
 
  <nowiki>led = pyb.LED(4)
Ligne 84 : Ligne 84 :  
     pyb.delay(20)</nowiki>
 
     pyb.delay(20)</nowiki>
   −
You can call intensity() on the other LEDs but they can only be off or on. 0 sets them off and any other number up to 255 turns them on.
+
Vous pouvez appeler intensity() sur les autres LEDs mais elles peuvent uniquement être éteinte ou allumée. La valeur 0 permet de les éteindre... tout autre valeur (jusqu'à 255) l'allumera.
 +
 
 
{{MicroPython-Hack-LED-TRAILER}}
 
{{MicroPython-Hack-LED-TRAILER}}
29 917

modifications

Menu de navigation