Amateur mistake reading data from sd card

Hello everyone, I’m working on a project that relates data from my heartbeat to a motor, I already have the data of several days worth of pulse reading in a SD card in some .txt files. The problem is that when I try to read them they don’t show up. The data is saved like this:

451
465
470
477
474
473
489
627
891
915

The code I’m using right now is quite simple, what I need now is to know how to read de data, then I think I can figure out how to use it.

Thanks!!

leerSDvalores.ino (526 Bytes)

If it's to just see it's contents (aka "dump" the file), only a simple read/write combination is required:

while (myFile.available()) Serial.write(myFile.read());

However, I'm also suspecting the fact you aren't specifying the CS pin, and the fact you're assuming the card will be always initialized and the file always opened. In other words: the failure events might be going unnoticed because you aren't checking them.

PD (in spanish btw): si hablas español, deberías saber que existe un subforo para el idioma. Solo para que lo sepas, no me lo tomes como un regaño porque mientras hables inglés por estos lados, nadie se va a quejar :smiley:

The problem is that when I try to read them they don't show up.

The code you posted does something. You failed to tell us what it actually does.

You assume that you successfully opened the file. That is a terrible assumption to make, and may be the root of your problems.