If you are citizen of an European Union member nation, you may not use this service unless you are at least 16 years old.
You already know Dokkio is an AI-powered assistant to organize & manage your digital files & messages. Very soon, Dokkio will support Outlook as well as One Drive. Check it out today!
b. Explain what would you do differently to insert the same text string, but at the beginning of the file (without over-writing the current contents). You don't have to code this: just explain the process. If you're interested and have time make it work, show us your program.
Read all contents of the file, save into array based on the sized of the file, then seek(0) and write the new line followed by the saved data in the array.
✔
c. Now tell us if your approach would work if the file were larger than your Arduino's memory (which is 2.5KB). If not, how could you work around that limitation?
Make a new file, write the new content and then read the data from the other file and dump the data
✔
a. Post your code.
/*
SD card file dump
This example shows how to read a file from the SD card using the
display.setCursor(0, 0); //set top-left corner at text at positon 0,0 (upper left most section of screen).
File dataFile = SD.open("datalog.txt");
while (dataFile.available()) {
display.print(char(dataFile.read()));
}
display.display();
delay(500);
}
✔
a. Tell us what you had to change to make this work.
Make a new file for the data logging, add the basic code to init the sd card. Then instead of writing to the EEPROM I wrote to the file, when I wanted to display the data on the LCD I opened my file and read and printed the data.
Comments (1)
xyyue@... said
at 2:07 pm on Aug 11, 2015
Well done.
You don't have permission to comment on this page.