PLEASE NOTE - I attended lab session on Friday instead of my usual Wednesday, so this is not late.
a. How can you check you're board is now running at 3.3V? Check it out!
Using the multimeter to compare Vcc to Gnd, I see that the difference is nearly 3.3V. ✔
a. With the smaller font, what is the longest message you can write across one line of the display? How many lines can you write?
14 characters across, 6 lines down. ✔
✔ Very nice logo!!!
Both are serial devices and need clock and other serial communication pins. I could use a chip select pin to tell each device when I am communicating with it. ✔
a. Include the code that you had to insert to do this in your lab writeup.
File dataFile = SD.open("datalog.txt", FILE_WRITE);
dataFile.write("This is a test of the emergency broadcast system.");
dataFile.close();
//the rest remains unchanged✔
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).
I would seek(0), read the amout which I wanted to write, seek(0), write my string, and repeat until I had reached the end of the file. I could not do this in one step because of the limited memory of the device. ✔
a. Post your code.
File dataFile = SD.open("datalog.txt");
int lc = 0;
if (dataFile) {
while (dataFile.available()) {
lcd.writeChar( dataFile.read(), MODE_NORMAL);
lc ++;
}
dataFile.close();
} else {
Serial.println("error opening datalog.txt");
} ✔
a. Tell us what you had to change to make this work.
✔