Loading...
Pages: [1]   Go Down
Author Topic: Read a specific offset from an fat16 SD card file?  (Read 432 times)
0 Members and 1 Guest are viewing this topic.
Nowhere at all
Offline Offline
Newbie
*
Karma: 0
Posts: 38
Patience, discipline
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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
Logged

Netherlands
Offline Offline
Tesla Member
***
Karma: 91
Posts: 9449
In theory there is no difference between theory and practice, however in practice there are many...
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset


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

Code:
boolean File::seek(uint32_t pos) {
  return SD.file.seekSet(pos);
}
Logged

Rob Tillaart

Nederlandse sectie - http://arduino.cc/forum/index.php/board,77.0.html -

Nowhere at all
Offline Offline
Newbie
*
Karma: 0
Posts: 38
Patience, discipline
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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


BR
Logged

Nowhere at all
Offline Offline
Newbie
*
Karma: 0
Posts: 38
Patience, discipline
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Worked 100%

Thanks!!!
Logged

Netherlands
Offline Offline
Tesla Member
***
Karma: 91
Posts: 9449
In theory there is no difference between theory and practice, however in practice there are many...
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Welcome,
BTW seek() can also be used for other ranges smiley-wink
Logged

Rob Tillaart

Nederlandse sectie - http://arduino.cc/forum/index.php/board,77.0.html -

Pages: [1]   Go Up
Print
 
Jump to: