The command:
Adafruit_NeoPixel pixels(100, PIN, NEO_GRB + NEO_KHZ800);
Works fine. I can open the data file.
The command:
Adafruit_NeoPixel pixels(150, PIN, NEO_GRB + NEO_KHZ800);
executes. However it will NOT open the data file. I get "myFile" = 0.
any suggestions?
Code: Select all
// For SD card reading
#include <SPI.h>
#include <SD.h>
#define SDPIN 10 // pin for reading data from the SD card
File myFile; // I am not sure what this does
// For LED cntrol
#include <Adafruit_NeoPixel.h>
#define PIN 6 // Pin the commands the LEDs
#define NLEDs 100 // Number of LEDs
// for reading the data file
#define FNAME "LEDs150.txt"
// adafruit lib led control
Adafruit_NeoPixel pixels(NLEDs, PIN, NEO_GRB + NEO_KHZ800);
void setup() {
pixels.begin(); // INITIALIZE NeoPixel strip object (REQUIRED)
// Open serial communications and wait for port to open:
Serial.begin(9600);
while (!Serial) {
; // wait for serial port to connect. Needed for native USB port only
}
if (!SD.begin(SDPIN)) {
Serial.println("initialization failed!");
while (1);
}
Serial.println("initialization done.");
// open the file for reading:
myFile = SD.open(FNAME);
Serial.println(myFile);
if (myFile) {
Serial.println(FNAME);
}
// close the file:
myFile.close();
}