I have a long piece of text I would like my Arduino Micro to output using Keyboard HID. However, since the text is too long to be stored in the internal memory I have decided to use an SD Card. Opening the .txt file in the SD card, reading the characters one-by-one into a String str, and then calling Keyboard.println(str) sadly doesn't work because I cannot store the whole text file in a String variable, obviously.
When I try to do the Keyboard operations while reading from the file, the Keyboard does not output anything.
while (myFile.available()) {
char letter = myFile.read();
Keyboard.write(letter);
}
I am thinking the two libraries collide because they each use SPI, so I cannot simultaneously read characters from a file and output them as keystrokes. Any thoughts?