arduino-libraries / SD

SD Library for Arduino
http://arduino.cc/
GNU General Public License v3.0
179 stars 155 forks source link

unable to read .db file, returns -1 till the end of the file #161

Open IshaSheikh opened 2 hours ago

IshaSheikh commented 2 hours ago

my objective is read a .db file from an SDcard and send it byte/byte through BTclassic. before doing anything I am trying to read the file and print it on the Serial monitor. I am able to get the contents with other types of files but theres some issue when i try to read a .db file. image in my code i have tested using a simple txt file(new.txt) and the db file is attendance.db. I am using the serial input from my pc to give input whether to open the txt or the db file. the 'input' variable used in the code is the variable receiving the serial input image

IshaSheikh commented 2 hours ago

the same .db file reads properly when open with the HEXeditor(tool to view hex for any file in VScode)