• If you are citizen of an European Union member nation, you may not use this service unless you are at least 16 years old.



Page history last edited by Raphaelm 8 years, 1 month ago

a. With the standard font, what is the longest message you can write across one line of the display? How many lines can you write?

I counted 15 chars (but I might just be bad at counting...)


a. Upload a photo of your personal logo, shown on your LCD screen, to your Lab 5 page.



a. Include the code that you had to insert to do this in your lab writeup. 

You just need to add

[dataFile.write("Shaun the Sheep");]

b. Explain what would you do differently (or show us your code!) to insert the same text string, but at the beginning of the file (without over-writing the current contents).

[ code :

File dataFile;

dataFile.write("Shaun the Sheep");

Serial.println("Shaun the Sheep");

File sdFile = SD.open("datalog.txt");






if(sdFile) {

while(sdFile.available()) {

char read = sdFile.read();






sdFile = dataFile;

sdFile.flush(); //Just to be sure that it saves




a. Post your code.

It's not much, you add in all of the lcd initilizers from graphicsExample to the SD_Example_Code file, and change Serial. to lcd.


a. Tell us what you had to change to make this work

I did not have to change much, I just imported the SD library, initialized a File, and used the read/write commands for the File instead of the EEPROM ones.


Comments (0)

You don't have permission to comment on this page.