I've used the x.toCharArray() method in the past to move strings into char arrays, but I am having issues doing so with a char.
Code snippet below:
userFile = SD.open("temp.txt");
Serial.println("Char buff size: ");
Serial.print(userFile.size());
char text[userFile.size()];
if (userFile) {
while (userFile.available() >= 1) {
char c = userFile.read();
c.toCharArray(text, userFile.size());
}
I tried making c a string, but then i get a conversion from int to String error. Any ideas?