M20 is a member of a class of M-codes which are used to access and manage the contents of the connected Smoothie’s SD Card
Issuing an M20 causes the contents of Smoothie’s SD card to be output to its serial port. A properly connected host will in turn receive and display the Smoothie’s SD card directory to its console.
To verify and debug your Smoothie’s serial connection try this: debug:computer-sees-board
{ARTHUR: Special instructions for Ethernet connections?}
M20-M36 are also members of this class of SD card commands:
The command is used as such:
M20 [S] [P]
What it does: Outputs contents of SD card to serial port while using S
to define the format and P
defines the directory to list.
Parameter | Usage | Example |
---|---|---|
S |
Style: Defines the format used to present the output | M20 S0 |
P |
Directory: Defines the directory that will be listed | M20 |
The S
parameter when used with Smoothie supports Style 0 only, which is the default. If you do not include S
it will assume S0
.
The P
parameter is not supported by Smoothie. Smoothie defaults to the SD card’s root directory.
If your SD card contents were:
This means if you command:
M0 S0
or
M0 S0 P1
or
M0 S1 P1
or
M0 P2
…they will all print the following to the connected console:
Ok
config.txt
firmware.cur
Readme.txt
myGgcode.gcode
The M0 command is not modal.
These resources are used as references: