Go Down

Topic: Read a specific offset from an fat16 SD card file? (Read 1 time) previous topic - next topic

Bi0H4z4rD

I would like to know if it would be possible, to say, to read from 0x53000 to 0x53422 of a file called "test.bin" that is in a fat16 formatted SD card.

If so, how?

BR

robtillaart


think you're looking for seek(position) - see libraries/SD/file.cpp of your arduno distri.

Code: [Select]
boolean File::seek(uint32_t pos) {
  return SD.file.seekSet(pos);
}
Rob Tillaart

Nederlandse sectie - http://arduino.cc/forum/index.php/board,77.0.html -
(Please do not PM for private consultancy)

Bi0H4z4rD

Thanks robtillaart, will check it right now and post results!


BR


robtillaart

Welcome,
BTW seek() can also be used for other ranges ;)
Rob Tillaart

Nederlandse sectie - http://arduino.cc/forum/index.php/board,77.0.html -
(Please do not PM for private consultancy)

Go Up