Go Down

Topic: Reading from sd card and comparing (Read 503 times) previous topic - next topic

SidDas

I am making a gaming console using Arduino Mega and I plan to store high scores for the game in a file in sd card. Every time the player finishes a game the code should read the pre stored high scores in sd card and then compare the score of the game with with existing high scores and then write the score into file accordingly...... Can anyone help me with the code as I am new to arduino.......... 

PaulS

Quote
Can anyone help me with the code as I am new to arduino.......... 

With what part of it?

Opening the file?

Reading one character at a time until the end of record marker is encountered?

Storing that character in an array?

Null terminating the array?

Parsing the data in the array?

Converting tokens to ints?

There is nothing particularly challenging about your project. You just need to break it into manageable pieces, and implement each piece.

Grumpy_Mike

Do you need all the space of an SD card to do that?
Why not use the internal EEPROM.

Go Up