Problem uploading

I'm trying to upload a sketch to Sparkfun Lilypad mp3 the sketch compiles fine. Sparkfun says to select “Arduino Pro or Pro Mini (3.3V/8MHz) w/ATmega 328”.

Here is the error message I'm getting

Arduino: 1.6.10 (Windows 8.1), Board: "Arduino Pro or Pro Mini, ATmega328 (3.3V, 8 MHz)"

In file included from C:\Program Files (x86)\Arduino\libraries\SdFat/ArduinoStream.h:26:0,

from C:\Program Files (x86)\Arduino\libraries\SdFat/SdFat.h:40,

from C:\Users\Clint\Documents\Arduino\sketch_sep03b\sketch_sep03b.ino:11:

C:\Program Files (x86)\Arduino\libraries\SdFat/bufstream.h:64:25: warning: unused parameter 'off' [-Wunused-parameter]

bool seekoff(off_type off, seekdir way) {return false;}

^

C:\Program Files (x86)\Arduino\libraries\SdFat/bufstream.h:64:38: warning: unused parameter 'way' [-Wunused-parameter]

bool seekoff(off_type off, seekdir way) {return false;}

^

C:\Program Files (x86)\Arduino\libraries\SdFat/bufstream.h:128:25: warning: unused parameter 'off' [-Wunused-parameter]

bool seekoff(off_type off, seekdir way) {return false;}

^

C:\Program Files (x86)\Arduino\libraries\SdFat/bufstream.h:128:38: warning: unused parameter 'way' [-Wunused-parameter]

bool seekoff(off_type off, seekdir way) {return false;}

^

In file included from C:\Program Files (x86)\Arduino\libraries\SdFat/SdFat.h:40:0,

from C:\Users\Clint\Documents\Arduino\sketch_sep03b\sketch_sep03b.ino:11:

C:\Program Files (x86)\Arduino\libraries\SdFat/ArduinoStream.h:74:25: warning: unused parameter 'off' [-Wunused-parameter]

bool seekoff(off_type off, seekdir way) {return false;}

^

C:\Program Files (x86)\Arduino\libraries\SdFat/ArduinoStream.h:74:38: warning: unused parameter 'way' [-Wunused-parameter]

bool seekoff(off_type off, seekdir way) {return false;}

^

C:\Program Files (x86)\Arduino\libraries\SdFat/ArduinoStream.h:79:25: warning: unused parameter 'pos' [-Wunused-parameter]

bool seekpos(pos_type pos) {return false;}

^

C:\Program Files (x86)\Arduino\libraries\SdFat/ArduinoStream.h:110:25: warning: unused parameter 'off' [-Wunused-parameter]

bool seekoff(off_type off, seekdir way) {return false;}

^

C:\Program Files (x86)\Arduino\libraries\SdFat/ArduinoStream.h:110:38: warning: unused parameter 'way' [-Wunused-parameter]

bool seekoff(off_type off, seekdir way) {return false;}

^

C:\Program Files (x86)\Arduino\libraries\SdFat/ArduinoStream.h:111:25: warning: unused parameter 'pos' [-Wunused-parameter]

bool seekpos(pos_type pos) {return false;}

^

C:\Users\Clint\Documents\Arduino\sketch_sep03b\sketch_sep03b.ino: In function 'void setup()':

C:\Users\Clint\Documents\Arduino\sketch_sep03b\sketch_sep03b.ino:46:6: warning: unused variable 'x' [-Wunused-variable]

int x, index;

^

C:\Users\Clint\Documents\Arduino\sketch_sep03b\sketch_sep03b.ino:48:7: warning: unused variable 'result' [-Wunused-variable]

byte result;

^

C:\Users\Clint\Documents\Arduino\sketch_sep03b\sketch_sep03b.ino: In function 'void loop()':

C:\Users\Clint\Documents\Arduino\sketch_sep03b\sketch_sep03b.ino:109:6: warning: variable 't' set but not used [-Wunused-but-set-variable]

int t; // current trigger

^

C:\Users\Clint\Documents\Arduino\sketch_sep03b\sketch_sep03b.ino:110:13: warning: unused variable 'last_t' [-Wunused-variable]

static int last_t; // previous (playing) trigger

^

C:\Users\Clint\Documents\Arduino\sketch_sep03b\sketch_sep03b.ino:111:6: warning: unused variable 'x' [-Wunused-variable]

int x;

^

C:\Users\Clint\Documents\Arduino\sketch_sep03b\sketch_sep03b.ino:112:7: warning: unused variable 'result' [-Wunused-variable]

byte result;

^

Sketch uses 11,388 bytes (37%) of program storage space. Maximum is 30,720 bytes.
Global variables use 1,070 bytes (52%) of dynamic memory, leaving 978 bytes for local variables. Maximum is 2,048 bytes.
An error occurred while uploading the sketch

This report would have more information with
"Show verbose output during compilation"
option enabled in File -> Preferences.

I don't think this is linked to your code or the warnings.

Can you upload a very basic program, like the sketch that does nothing

void setup() {}
void loop() {}

Got it. It helps if you download and install the FTDI drivers for the FTDI cable that is used for programming. Thanks J-M-L after doing what you said it dawned on me what the issue was.

Great!

Happy coding !

The following code is for Sparkfun's Lilypad mp3 an atmega 328 running at 3.3 volts and 8Mhz powered Arduino based mp3 player. the code pulls the mp3 files from an SD card (files named 1.mp3, 2.mp3 etc) and plays them when one of 5 trigger pins are pulled low. the code is setup to randomly play up to 12 mp3 files when trigger pi 1 is pulled low by a pir sensor. right now it is playing randomly with out being triggered.

// "Trigger" example sketch for Lilypad MP3 Player Modified

// 1.0 initial release MDG 2012/11/01

// We'll need a few libraries to access all this hardware!

#include <SPI.h> // To talk to the SD card and MP3 chip
#include <SdFat.h> // SD card file system
#include <SFEMP3Shield.h> // MP3 decoder chip

// And a few outputs we'll be using:

const int ROT_LEDR = 10; // Red LED in rotary encoder (optional)
const int EN_GPIO1 = A2; // Amp enable + MIDI/MP3 mode select
const int SD_CS = 9; // Chip Select for SD card

// Create library objects:

SFEMP3Shield MP3player;
SdFat sd;

// We'll store the five filenames as arrays of characters.
// "Short" (8.3) filenames are used, followed by a null character.

char filename[12][13]; //This is for 12 sound files

int pirPin = A0; //the pin where we read the val of the motsen
int pirVal; //stores the value (hi or lo) for the motion sensor

unsigned long time1;
unsigned long time2;

void setup()
{

time1 = millis();
pinMode(pirPin, INPUT);

int x, index;
SdFile file;
byte result;
char tempfilename[13];

// The board uses a single I/O pin to select the
// mode the MP3 chip will start up in (MP3 or MIDI),
// and to enable/disable the amplifier chip:

pinMode(EN_GPIO1,OUTPUT);
digitalWrite(EN_GPIO1,LOW); // MP3 mode / amp off

// Initialize the SD card; SS = pin 9, half speed at first

sd.begin(SD_CS, SPI_HALF_SPEED); // 1 for success

// Start up the MP3 library

MP3player.begin(); // 0 or 6 for success

// Now we'll access the SD card to look for any (audio) files
// starting with the characters '1' to '5':

// if (debugging) Serial.println(F("reading root directory"));

// Start at the first file in root and step through all of them:

sd.chdir("/",true);
while (file.openNext(sd.vwd(),O_READ))
{
// get filename

file.getFilename(tempfilename);

// Does the filename start with char '1' through '5'?

index = tempfilename[0] - '1';

// Copy the data to our filename array.

strcpy(filename[index],tempfilename);

file.close();
}

// Set the VS1053 volume. 0 is loudest, 255 is lowest (off):

MP3player.setVolume(10,10);

// Turn on the amplifier chip:

digitalWrite(EN_GPIO1,HIGH);
delay(2);
}

void loop()
{

int t; // current trigger
static int last_t; // previous (playing) trigger
int x;
byte result;

time2 = millis();

if((time2 - time1)>=1000){
pirVal = digitalRead(pirPin);
time1 = time2;
}

t = 3;

if(pirVal == HIGH){
MP3player.playMP3(filename[random(0,11)]);
delay(5000);
}
}

Please read how to use the forum and use code tag afetr indenting code correctly

So that your code above appears like this

// some nice code here presented the right way

// may be you are missing this after changing the directory to /
sd.vwd()->rewind();

Too painful to read at the moment like you copied it

// "Trigger" example sketch for Lilypad MP3 Player Modified


  // 1.0 initial release MDG 2012/11/01


  // We'll need a few libraries to access all this hardware!

    #include <SPI.h> // To talk to the SD card and MP3 chip
    #include <SdFat.h> // SD card file system
    #include <SFEMP3Shield.h> // MP3 decoder chip



  // And a few outputs we'll be using:

    const int ROT_LEDR = 10; // Red LED in rotary encoder (optional)
    const int EN_GPIO1 = A2; // Amp enable + MIDI/MP3 mode select
    const int SD_CS = 9; // Chip Select for SD card

  // Create library objects:

    SFEMP3Shield MP3player;
    SdFat sd;


  // We'll store the five filenames as arrays of characters.
  // "Short" (8.3) filenames are used, followed by a null character.

    char filename[12][13]; //This is for 12 sound files

    int pirPin = A0; //the pin where we read the val of the motsen
    int pirVal; //stores the value (hi or lo) for the motion sensor

    unsigned long time1;
    unsigned long time2;


void setup()
{

    time1 = millis();
    pinMode(pirPin, INPUT); 

    int x, index;
    SdFile file;
    byte result;
    char tempfilename[13];

  // The board uses a single I/O pin to select the
  // mode the MP3 chip will start up in (MP3 or MIDI),
  // and to enable/disable the amplifier chip:

    pinMode(EN_GPIO1,OUTPUT);
    digitalWrite(EN_GPIO1,LOW); // MP3 mode / amp off

  // Initialize the SD card; SS = pin 9, half speed at first


    sd.begin(SD_CS, SPI_HALF_SPEED); // 1 for success

  // Start up the MP3 library

    MP3player.begin(); // 0 or 6 for success

  // Now we'll access the SD card to look for any (audio) files
  // starting with the characters '1' to '5':

  // if (debugging) Serial.println(F("reading root directory"));

  // Start at the first file in root and step through all of them:

    sd.chdir("/",true);
    while (file.openNext(sd.vwd(),O_READ))
 {
  // get filename

    file.getFilename(tempfilename);

  // Does the filename start with char '1' through '5'? 

    index = tempfilename[0] - '1';

  // Copy the data to our filename array.

     strcpy(filename[index],tempfilename);
     file.close();
 }

  // Set the VS1053 volume. 0 is loudest, 255 is lowest (off):

    MP3player.setVolume(10,10);

  // Turn on the amplifier chip:

    digitalWrite(EN_GPIO1,HIGH);
    delay(2);
}


void loop()
{
    int t; // current trigger
    static int last_t; // previous (playing) trigger
    int x;
    byte result;

    time2 = millis();

    if((time2 - time1)>=1000){
    pirVal = digitalRead(pirPin);
    time1 = time2;
 }


    t = 3; 

    if(pirVal == HIGH){
    MP3player.playMP3(filename[random(0,11)]);
    delay(5000);
 }
}

Did you notice my comment above about missing

sd.vwd()->rewind();

J-M-L, I tried adding what you said. it didn't help to me it looks/sounds like it is stuck in a loop playing the mp3 files randomly (what file is next is the random part and is working fine) and ignoring weather the trigger pin "A0" is being pulled low. so the part that is not working is the code seams to be ignoring what is happening to pin "A0" and playing no matter what.