Modifications

Sauter à la navigation Sauter à la recherche
85 octets ajoutés ,  28 février 2014 à 11:42
Ligne 75 : Ligne 75 :  
Adafruit_NeoPixel strip = Adafruit_NeoPixel(60, PIN, NEO_GRB + NEO_KHZ800);</nowiki>
 
Adafruit_NeoPixel strip = Adafruit_NeoPixel(60, PIN, NEO_GRB + NEO_KHZ800);</nowiki>
   −
La première ligne assigne un nombre au symbole "PIN" pour l'utiliser comme référence plus tard. Il n'est pas absolument nécessaire de le faire comme cela, mais cela rend le changement de code plus simple si vous voulez utiliser une autre broche de commande... dans le cas contraire, il serait nécessaire de contrôler tout le code.
+
La première ligne assigne un nombre au symbole "PIN" pour l'utiliser comme référence plus tard. Il n'est pas absolument nécessaire de le faire comme cela, mais cela rend le changement de code plus simple si vous voulez utiliser une autre broche de commande... dans le cas contraire, il serait réviser la totalité du code.
   −
The last line declares a NeoPixel ''object''. We’ll refer to this by name later to control the strip of pixels. There are three parameters or arguments in parenthesis:
+
La dernière ligne déclare un ''objet'' NéoPixel. Nous nous référerons à ce dernier plus tard dans le code pour contrôler le ruban/strip de pixels. Il y a 3 arguments/paramètres dans les paranthèses:
# The number of sequential NeoPixels in the strip. In the example this is set to 60, equal to 1 meter of medium-density strip. Change this to match the actual number you’re using.
+
# Le nombre de NéoPixel chainés dans le ruban/strip. Dans cet exemple il est fixé à 60, ce qui correspond à un mètre de ruban à densité moyenne. Modifiez ce paramètre pour qu'il corresponde au nombre de pixels que vous utilisez.
 
# The pin number to which the NeoPixel strip (or other device) is connected. Normally this would be a number, but we previously declared the symbol PIN to refer to it by name here.
 
# The pin number to which the NeoPixel strip (or other device) is connected. Normally this would be a number, but we previously declared the symbol PIN to refer to it by name here.
 
# A value indicating the type of NeoPixels that are connected. '''In most cases you can leave this off and pass just two arguments'''; the example code is just being extra descriptive. If you have a supply of classic “V1” Flora pixels, those require NEO_KHZ400 + NEO_RGB to be passed here.
 
# A value indicating the type of NeoPixels that are connected. '''In most cases you can leave this off and pass just two arguments'''; the example code is just being extra descriptive. If you have a supply of classic “V1” Flora pixels, those require NEO_KHZ400 + NEO_RGB to be passed here.
29 917

modifications

Menu de navigation