Bonjour j'ai une bande 2 bande led à utiliser , j'ai en une qui fonctionne le début de mon code est ceci :
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
 
#include <Adafruit_NeoPixel.h>
 
#ifdef __AVR__
 #include <avr/power.h> // Required for 16 MHz Adafruit Trinket
#endif
 
// Which pin on the Arduino is connected to the NeoPixels?
#define PIN        5// On Trinket or Gemma, suggest changing this to 1
#define PIN2        4// On Trinket or Gemma, suggest changing this to 1
// How many NeoPixels are attached to the Arduino?
#define NUMPIXELS 16 // Popular NeoPixel ring size
 
// When setting up the NeoPixel library, we tell it how many pixels,
// and which pin to use to send signals. Note that for older NeoPixel
// strips you might need to change the third parameter -- see the
// strandtest example for more information on possible values.
Adafruit_NeoPixel pixels(NUMPIXELS, PIN, NEO_GRB + NEO_KHZ800);
par contre comment je fais si je souhaite ajouter une autre bande led ? le premier est défini par la PIN:

Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
 
#define PIN        5// On Trinket or Gemma, suggest changing this to 1
si je fait ceci cela fonctionne pas:
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
 
Adafruit_NeoPixel pixels(NUMPIXELS, PIN, NEO_GRB + NEO_KHZ800);
Adafruit_NeoPixel pixels(NUMPIXELS, PIN2, NEO_GRB + NEO_KHZ800);
merci de votre réponse