I have written the following code to let the user choose which file they wish to write data to. I am having problems with setting filename equal to the data read from the serial port because of incompatible types. How can I convert the serial port message to the same type as filename?
The error message I am having is : incompatible types in assignment of 'int' to 'char'
Serial.println("Please enter a file name to write data to"); char filename; filename = (Serial.read()); myFile = SD.open(filename, FILE_WRITE);