-
-
Save Tech500/b05c2d9837952a926f09e31a1e2a618f to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 09/03/2022 @ 04:35 Able to read List of 10 words | |
// How to print third word in list? | |
void readWord(){ | |
// Open a "wordfile.txt" for reading | |
File word = LittleFS.open("/wordfile.txt", "r"); //input words from "wordfile.txt" | |
if (! word){ | |
Serial.println("File 'wordfile.txt' open failed"); | |
} | |
while(word.available()) { | |
for(wordCount; wordCount < 10; wordCount++) { //Build an arrary of words | |
inputWord[wordCount] = word.readStringUntil('\n'); | |
Serial.println(inputWord[wordCount]); | |
} | |
word.close(); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment