Help for autonomous playing file from SD card

Hi everyone.

i’m eager to learn how to play a file from sd card by pressing only on button without any software,HMI or PC-connetion.
by the way i don’t want to play a file as “on_boot_gcode”.
so here is the deal. i put a gcode file with a specific name in the sd card and define some input control keys to play a file without HMI or PC.
is there any way to reach this purpose?

best regards

it solved. tnx to you all.
here is the deal. you have to define a switch module in config file and set the switch output command to for example"M32 yourgcode.txt" and when you trigger your button, it will play your gcode without need restart or on boot gcode.

##preparing a start button for execute main program
switch.misc5.enable true # do you want to enable this module for connecting a push_button to it? yes i do
switch.misc5.input_pin 2.11 # my push_button connected to this pin
switch.misc5.input_pin_behavior momentary # execute program till i pressed the button
switch.misc5.output_on_command M32_main.txt # execute main gcode directly by grounding pin 2.11

hope could be useful.
enjoy :slight_smile: