Modifications

Sauter à la navigation Sauter à la recherche
329 octets ajoutés ,  27 février 2014 à 21:34
Ligne 66 : Ligne 66 :  
  <nowiki>#define PIN 6
 
  <nowiki>#define PIN 6
   −
// Parameter 1 = number of pixels in strip
+
// Paramètre 1 = Le nombre de NéoPixels chainés
// Parameter 2 = pin number (most are valid)
+
// Paramètre 2 = No de broche (la plupart convient)
// Parameter 3 = pixel type flags, add together as needed:
+
// Paramètre 3 = Type de pixel (flags/drapeaux), a combiner ensemble en fonction du besoin:
//  NEO_KHZ800  800 KHz bitstream (most NeoPixel products w/WS2812 LEDs)
+
//  NEO_KHZ800  flux de données à 800 KHz (plupart des NéoPixel basé sur les LEDs w/WS2812)
//  NEO_KHZ400  400 KHz (classic 'v1' (not v2) FLORA pixels, WS2811 drivers)
+
//  NEO_KHZ400  flux de données à 400 KHz (Pour les Pixels classiques 'v1' FLORA (pas les V2) pilotés par WS2811)
//  NEO_GRB    Pixels are wired for GRB bitstream (most NeoPixel products)
+
//  NEO_GRB    Pixels sont raccordés en flux de donnée GRB (GRB=Green,Red,Blue=Vert,Rouge,Bleu - la plupart des produits NéoPixel)
//  NEO_RGB    Pixels are wired for RGB bitstream (v1 FLORA pixels, not v2)
+
//  NEO_RGB    Pixels sont raccordés en flux de donnée RGB (RGB=Red,Green,Blue=Rouge,Vert,Bleu - Pixels FLORA v1, pas la v2)
 
Adafruit_NeoPixel strip = Adafruit_NeoPixel(60, PIN, NEO_GRB + NEO_KHZ800);</nowiki>
 
Adafruit_NeoPixel strip = Adafruit_NeoPixel(60, PIN, NEO_GRB + NEO_KHZ800);</nowiki>
   −
The first line assigns a number to the symbol “PIN” for later reference. It doesn’t ''need'' to be done this way, but makes it easier to change the pin where the NeoPixels are connected without digging deeper into the 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 nécessaire de contrôler tout le 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:
 
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:
Ligne 137 : Ligne 137 :  
Just like setPixel(), '''this does not have an immediate effect'''. You need to follow this with a call to show().
 
Just like setPixel(), '''this does not have an immediate effect'''. You need to follow this with a call to show().
   −
You can’t move from a lower brightness to a higher setting without some loss in fidelity. Certain animation effects are better served by leaving the brightness at max and calling setPixel() repeatedly to fill the strip.  
+
You can’t move from a lower brightness to a higher setting without some loss in fidelity. Certain animation effects are better served by leaving the brightness at max and calling setPixel() repeatedly to fill the strip.
    
=== I’m calling setPixel() but nothing’s happening! ===
 
=== I’m calling setPixel() but nothing’s happening! ===
29 917

modifications

Menu de navigation