Modifications
Sauter à la navigation
Sauter à la recherche
← Modification précédente
Modification suivante →
TrinKey-QT2040
(voir la source)
Version du 21 août 2024 à 17:53
37 octets supprimés
,
21 août 2024 à 17:53
→Led NeoPixel
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>
Admin
Bureaucrates
,
Administrateurs
32 920
modifications
Menu de navigation
Outils personnels
Se connecter
Espaces de noms
Page
Discussion
Variantes
Affichages
Lire
Voir le texte source
Voir l’historique
Plus
Rechercher
Navigation
ARDUINO
RASPBERRY-PI
[:: PI Hacking ::]
Particle.IO
Micro Python
Imprimante 3D
Actualités
Modifications récentes
Page au hasard
Aide
Outils
Pages spéciales
Version imprimable