Yes, ledd[0], ledd[1], ledd[2] all contain an individual number, do they not?
I thought maybe the problem was in the minimal code, with my variables declarations and libraries.
I tried this:
#include <Time.h>
#include <Adafruit_NeoPixel.h>
#ifdef __AVR__
#include <avr/power.h>
#endif
#define PIN 6
#define NUMPIXELS 400
Adafruit_NeoPixel pixels = Adafruit_NeoPixel(NUMPIXELS, PIN, NEO_GRB + NEO_KHZ800);
void setup() {
Serial.begin(9600);
pixels.begin(); // This initializes the NeoPixel library.
for (int i=0; i<NUMPIXELS;i++) {
pixels.setPixelColor(i, (0,0,0));
}
pixels.show();
delay(2000);
}
void loop() {
for (int i=0; i<NUMPIXELS;i++) {
pixels.setPixelColor(i, (25,250,250));
}
pixels.show();
delay(20000);
}
Works like a charm. But if I add this extra code at the top, it doesn't work anymore. The LEDs don't respond.
#include <Time.h>
#include <Adafruit_NeoPixel.h>
#ifdef __AVR__
#include <avr/power.h>
#endif
#include <SPI.h>
#include <SD.h>
Sd2Card card;
SdVolume volume;
SdFile root;
const int chipSelect = 4;
#define PIN 6
#define NUMPIXELS 400
Adafruit_NeoPixel pixels = Adafruit_NeoPixel(NUMPIXELS, PIN, NEO_GRB + NEO_KHZ800);
boolean stringComplete = false; // whether the string is complete
boolean readarray=false;
String inString = "";
int c=0;
int cc=0;
int led=0;
int i=0;
int j=0;
int pixel_n=0;
unsigned long start;
unsigned long endd;
//char* ledd[]={"", "", ""};
int ledd[3]={0,0,0};
File myFile;
void setup() {
Serial.begin(9600);
pixels.begin(); // This initializes the NeoPixel library.
for (int i=0; i<NUMPIXELS;i++) {
pixels.setPixelColor(i, (0,0,0));
}
pixels.show();
delay(2000);
}
void loop() {
for (int i=0; i<NUMPIXELS;i++) {
pixels.setPixelColor(i, (25,250,250));
}
pixels.show();
delay(20000);
}
Can it be a library/variable conflict?