hello!
i’m getting start with arduino and C language.
my little project:
control 8 led 1meter strip adafruit neopixel with my arduino uno.
first, we have to declare a name for each strip we are usig as folowing
Adafruit_NeoPixel name = Adafruit_NeoPixel(60, PIN, NEO_GRB)
as I have 8 led strip, i’d like to put all those name in an array.
so i did:
char strip[] = "abcdefgh"
with “a” the name of the first strip
“b” the name of the second etc…
first question, is it possible to use a for loop before the void setup?
anyway, the i put:
Adafruit_NeoPixel a = Adafruit_NeoPixel(60, PinColone[1], NEO_GRB);
Adafruit_NeoPixel b = Adafruit_NeoPixel(60, PinColone[2], NEO_GRB);
Adafruit_NeoPixel c = Adafruit_NeoPixel(60, PinColone[3], NEO_GRB);
Adafruit_NeoPixel d = Adafruit_NeoPixel(60, PinColone[4], NEO_GRB);
Adafruit_NeoPixel e = Adafruit_NeoPixel(60, PinColone[5], NEO_GRB);
Adafruit_NeoPixel f = Adafruit_NeoPixel(60, PinColone[6], NEO_GRB);
Adafruit_NeoPixel g = Adafruit_NeoPixel(60, PinColone[7], NEO_GRB);
Adafruit_NeoPixel h = Adafruit_NeoPixel(60, PinColone[8], NEO_GRB);
problem is in my void setup, I have to start communication with my strip by
name.begin();
or when i do:
for (int i = 0; i <= 7; i++) {
strip[i].begin();
}
it returns me :error: request for member ‘begin’ in ‘strip*’, which is of non-class type ‘char’*
i really don’t understand how i can solve this…
sorry for my bad english, i’m french