Modifications

Sauter à la navigation Sauter à la recherche
37 octets supprimés ,  21 août 2024 à 17:53
Ligne 91 : Ligne 91 :     
<syntaxhighlight lang="python">
 
<syntaxhighlight lang="python">
−
>>> from machine import Pin
+
from machine import Pin
−
>>> from neopixel import NeoPixel
+
from neopixel import NeoPixel
−
>>> px = NeoPixel( Pin.board.GP27, 1 ) # 1 seul pixel
+
px = NeoPixel( Pin.board.GP27, 1 ) # 1 seul pixel
−
>>> px[0] = (0xFF, 0x66, 0x00 ) # Orange
+
px[0] = (0xFF, 0x66, 0x00 ) # Orange
−
>>> px.write() # Mise-à-jour de la LED
+
px.write() # Mise-à-jour de la LED
−
>>> px[0] = (0, 255, 0 ) # Vert 100%
+
px[0] = (0, 255, 0 ) # Vert 100%
−
>>> px.write()
+
px.write()
−
>>> px[0] = (128, 0, 0 ) # rouge   
+
px[0] = (128, 0, 0 ) # rouge   
−
>>> px.write()
+
px.write()
−
 
   
</syntaxhighlight>
 
</syntaxhighlight>
  
32 920

modifications

Menu de navigation