utils/consoleSD.h for dice-SD provides the following function (SD library) to your console application:

  • s_console_SD() : which delivers the following commands
    • SD dir – lists the files on the SD card
    • SD write <file><text line> – creates/writes a line in a file
    • SD print <path/file> – prints out a file
    • SD remove <path/file> – removes a file


String s_console_string – String that holds the user command. Normally returned by s_console_routine() or a previous console function.


String : the user command or an empty String “” if the user command was recognised and processed by this function. (see of commands above)

Example Code:

#include "consoleLogin.h"
#include "utils/consoleSD.h"

void setup() {
void loop() {
  String s_console_string = s_console_routine();  

Notes and Warnings

This console-function and its commands are helpful to test and learn to work with the SD card file system and files. See the source code as example code for your own application:


In a ‘real world’ application, the s_console_SD() functions should not be required but during development it could be helpful.

Please keep in mind that each included file and its used function increase the size of the resulting application. So in order to keep the application binaries as small as possible, include only functions that are really necessary for the final application.

An example can be found in the Arduino IDE menu:
File -> Examples -> Consoles -> Dev_Console

See also

SD library