Pages: [1]   Go Down
Author Topic: Reading from sd card and comparing  (Read 459 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Newbie
*
Karma: 0
Posts: 10
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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.......... 
Logged

Seattle, WA USA
Offline Offline
Brattain Member
*****
Karma: 631
Posts: 50039
Seattle, WA USA
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
Logged

Manchester (England England)
Offline Offline
Brattain Member
*****
Karma: 631
Posts: 34488
Solder is electric glue
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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

Pages: [1]   Go Up
Jump to: