Modifications

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

modifications

Menu de navigation