Hi everyone, i'm working on a school project. Take in mind i'm kind of amateur in C++ well the thing right now is i've got the code for most part good but somehow it still does not work.
#include <Adafruit_NeoPixel.h>
#define Pixelpin 7 // Digital IO pin connected to the NeoPixels.
#define Numpixels 72
#define colorWipe
// Parameter 1 = number of pixels in strip, neopixel stick has 8
// Parameter 2 = pin number (most are valid)
// Parameter 3 = pixel type flags, add together as needed:
// NEO_RGB Pixels are wired for RGB bitstream
// NEO_GRB Pixels are wired for GRB bitstream, correct for neopixel stick
// NEO_KHZ400 400 KHz bitstream (e.g. FLORA pixels)
// NEO_KHZ800 800 KHz bitstream (e.g. High Density LED strip), correct for neopixel stick
Adafruit_NeoPixel Ledstrip = Adafruit_NeoPixel(Numpixels, Pixelpin, NEO_GRB + NEO_KHZ800);
// Dit is nodig om de Ledstrip functies aan te zetten.
void setup() {
Ledstrip.begin();
Ledstrip.show(); // Initialize all pixels to 'off'
Serial.begin(9600);
}
void loop() {//Er worden allerlei routines achter elkaar aangeroepen.
Ledstrip.setBrightness(32); // Op Brightness 255 gaat de 9 V batterij érg snel leeg....
Serial.println("Alles uit");
colorWipe(Ledstrip.Color(0, 0, 0), 50); // Black, alles uit. 100 msec lang
Serial.println("Rood, Groen, Blauw en wit looplicht. Led's blijven aan");
colorWipe(Ledstrip.Color(255, 0, 0), 50); // Red lopend lichtje, ledjes blijven achtereenvolgens aan.
colorWipe(Ledstrip.Color(0, 255, 0), 50); // Green lopend lichtje, ledjes blijven achtereenvolgens aan.
colorWipe(Ledstrip.Color(0, 0, 255), 50); // Blue lopend lichtje, ledjes blijven achtereenvolgens aan.
colorWipe(Ledstrip.Color(255, 255, 255), 50); // White lopend lichtje, ledjes blijven achtereenvolgens aan.
}
And this is my image of my project template/setup
Any suggestions why it isn't doing anything?
Thanks in advance.
- Jaouad