March Madness - SD Card Test |
OK, this one is VERY short, I didnt start working on it until almost 10:00 pm.
Continuing from yesterday testing and learning the Duion644 board. It has an SDcard slot on it and it came with the standard SD library. I wanted to test it. The board was originally desgined for a clock that had wise sayings. I copied the supplied text file to an SD card and wrote REAL SIMPLE TEST ROUTINE.
length sectors used 9582B 1 First sector of the file: 1344Total sectors: 18 Reading sector: 1344 A chain is only as strong as its weakest link A change is as good as a rest A fool and his money are soon parted A friend in need is a friend indeed A good beginning makes a good ending A good man is hard to find A house divided against itself cannot stand A house is not a home A journey of a thousand miles begins with a single step. - Confucius A leopard cannot change its spots A little knowledge is a dangerous thing A little of what you fancy does you good A miss is as good as a mile |
||
|
||
//************************************************************************ //* SD card test code //* (C) 2010 by Mark Sproul //* Open source as per standard Arduino code //* //************************************************************************ #include "WProgram.h" #include "HardwareSerial.h" #include "SDuFAT.h" int sectorNumber; #include "SDuFAT.h" //************************************************************************ void setup() { Serial.begin(9600); SD.ls("quotes.txt"); sectorNumber = 0; Serial.println(); } //************************************************************************ void loop() { SD.readBytes("quotes.txt", sectorNumber); sectorNumber++; } |