STM32 Nucleo board, SD card displaying symbols instead of numbers
You are writing the variable data directly to the file. You need to convert the data into a printable text string of ascii symbols and write the string to the file. You can use sprintf to do it, almost like when printing to serial port with printf.