Beispiel #1
0
void setup() {
  Serial.begin(9600);           // set up Serial library at 9600 bps
  Serial.println("Wave test!");

  pinMode(2, OUTPUT); 
  pinMode(3, OUTPUT);
  pinMode(4, OUTPUT);
  pinMode(5, OUTPUT);
  pinMode(redled, OUTPUT);
  
  if (!card.init_card()) {
    putstring_nl("Card init. failed!"); return;
  }
  if (!card.open_partition()) {
    putstring_nl("No partition!"); return;
  }
  if (!card.open_filesys()) {
    putstring_nl("Couldn't open filesys"); return;
  }

 if (!card.open_rootdir()) {
    putstring_nl("Couldn't open dir"); return;
  }

  putstring_nl("Files found:");
  ls();
}
void setup() {
  // set up serial port
  Serial.begin(9600);

  // set up waveshield pins
  pinMode(2, OUTPUT); 
  pinMode(3, OUTPUT);
  pinMode(4, OUTPUT);
  pinMode(5, OUTPUT);
  
  if (!card.init_card()) {
    Serial.println("Card init. failed!"); return;
  }
  if (!card.open_partition()) {
    Serial.println("No partition!"); return;
  }
  if (!card.open_filesys()) {
    Serial.println("Couldn't open filesys"); return;
  }

 if (!card.open_rootdir()) {
    Serial.println("Couldn't open dir"); return;
  }
}