From 2a986eb1a29520f44df7709dbf2d064193e5609f Mon Sep 17 00:00:00 2001 From: Lorenzooone Date: Fri, 21 Nov 2025 03:43:17 +0100 Subject: [PATCH] Improve Raspberry Pi Kiosk with multi-CC examples (and configuration parameter related to it) --- rpi_setup/files/config.txt | 5 +++ .../cc3dsfs_script_multi_3ds_example.sh | 34 ++++++++++++++++++ .../cc3dsfs_script_multi_ds_example.sh | 35 +++++++++++++++++++ 3 files changed, 74 insertions(+) create mode 100644 rpi_setup/files/main_files/premade_scripts/cc3dsfs_script_multi_3ds_example.sh create mode 100644 rpi_setup/files/main_files/premade_scripts/cc3dsfs_script_multi_ds_example.sh diff --git a/rpi_setup/files/config.txt b/rpi_setup/files/config.txt index 67e1cdc..7eae768 100644 --- a/rpi_setup/files/config.txt +++ b/rpi_setup/files/config.txt @@ -55,5 +55,10 @@ hdmi_enable_4kp60=1 # (e.g. for USB device mode) or if USB support is not required. otg_mode=1 +[pi5] +# Enables using more power for USB connections. +# Allows more CCs to be connected at the same time. +usb_max_current_enable=1 + [all] diff --git a/rpi_setup/files/main_files/premade_scripts/cc3dsfs_script_multi_3ds_example.sh b/rpi_setup/files/main_files/premade_scripts/cc3dsfs_script_multi_3ds_example.sh new file mode 100644 index 0000000..847ddb6 --- /dev/null +++ b/rpi_setup/files/main_files/premade_scripts/cc3dsfs_script_multi_3ds_example.sh @@ -0,0 +1,34 @@ +#!/bin/sh +# Example script for 4 3DSs connected at the same time +# Both screens, placed in an horizontal grid +# Scaled 1x + +# Needed for Optimize 3DS CCs to reconnect +SLEEP_TIME=10 + +# Set to 1 to enable configuration mode with only one window active. +# Set to 0 to enable all windows. +INITIAL_CONFIGURATION_MODE=0 + +${PREMADE_DIR}/${PROGRAM_NAME}_prepare_script.sh + +if [ "$INITIAL_CONFIGURATION_MODE" -eq "1" ]; then + +# Rightmost +${MAIN_KIOSK_PROGRAM} --enabled_both 1 --pos_x_both 1200 --pos_y_both 0 --profile 5 --auto_connect & +sleep ${SLEEP_TIME} + +# Middle-Right +${MAIN_KIOSK_PROGRAM} --enabled_both 1 --pos_x_both 800 --pos_y_both 0 --profile 5 --auto_connect & +sleep ${SLEEP_TIME} + +# Middle-Left +${MAIN_KIOSK_PROGRAM} --enabled_both 1 --pos_x_both 400 --pos_y_both 0 --profile 5 --auto_connect & +sleep ${SLEEP_TIME} + +fi + +# Leftmost +${MAIN_KIOSK_PROGRAM} --enabled_both 1 --pos_x_both 0 --pos_y_both 0 --profile 5 --auto_connect + +${PREMADE_DIR}/${PROGRAM_NAME}_post_script.sh $? diff --git a/rpi_setup/files/main_files/premade_scripts/cc3dsfs_script_multi_ds_example.sh b/rpi_setup/files/main_files/premade_scripts/cc3dsfs_script_multi_ds_example.sh new file mode 100644 index 0000000..02644bf --- /dev/null +++ b/rpi_setup/files/main_files/premade_scripts/cc3dsfs_script_multi_ds_example.sh @@ -0,0 +1,35 @@ +#!/bin/sh +# Example script for 4 DSs connected at the same time +# Top screens, placed in a 4x4 grid, with space on all sides +# For 1920x1080 +# Scaled 2x each + +# Needed for Optimize 3DS CCs to reconnect +SLEEP_TIME=10 + +# Set to 1 to enable configuration mode with only one window active. +# Set to 0 to enable all windows. +INITIAL_CONFIGURATION_MODE=0 + +${PREMADE_DIR}/${PROGRAM_NAME}_prepare_script.sh + +if [ "$INITIAL_CONFIGURATION_MODE" -eq "1" ]; then + +# Bottom Right +${MAIN_KIOSK_PROGRAM} --enable_both 0 --enabled_top 1 --pos_x_top 1184 --pos_y_top 618 --scaling_top 2 --profile 6 --auto_connect & +sleep ${SLEEP_TIME} + +# Bottom Left +${MAIN_KIOSK_PROGRAM} --enable_both 0 --enabled_top 1 --pos_x_top 224 --pos_y_top 618 --scaling_top 2 --profile 6 --auto_connect & +sleep ${SLEEP_TIME} + +# Top Right +${MAIN_KIOSK_PROGRAM} --enable_both 0 --enabled_top 1 --pos_x_top 1184 --pos_y_top 78 --scaling_top 2 --profile 6 --auto_connect & +sleep ${SLEEP_TIME} + +fi + +# Top Left +${MAIN_KIOSK_PROGRAM} --enable_both 0 --enabled_top 1 --pos_x_top 224 --pos_y_top 78 --scaling_top 2 --profile 6 --auto_connect + +${PREMADE_DIR}/${PROGRAM_NAME}_post_script.sh $?