Confused on why half of my code is not working?


#1

Hello,

I am working on a project linking a Blinkt! LED board to functionality in RetroPie. The basic idea being that launching a game in each individual system, will change the color that Blinkt! displays. I have gotten 2 systems to work so far, but the rest for some reason will turn off the LED’s that were on before it, but not light their assigned color. the Python scripts are identical to each other, expect for the color values and will all work when i execute them manually. Here is what i have so far.

in
/opt/retropie/configs/all/runcommand-onstart.sh.
Code: Select all

#!/bin/bash

get system from parameters

system=$1

run special python script for each system

case “$system” in
nes) python /path/to/nes.py
;;
snes) python /path/to/snes.py
;;
sega) python /path/to/sega.py
;;
n64) python /path/to/n64.py
;;
*) python /path/to/reset.py
;;

esac
The NES and SNES script will work well, and the reset.py script works on exit (resets to white). I have tried to changing the positions of the file paths and no matter where the NES and SNES file paths are in the list they work, and no matter where the “Sega” path is, it will not. i have 2 of the 5 systems loaded working currently.

Would anyone have any ideas what i could be missing?

thanks!


#2

I’d hazard a guess that “sega” isn’t a valid system- since that would encompass the GameGear, MegaDrive, Master System etc.


#3

I actually got this working last night after going through each folder that i had roms and seeing what the system was listed as in run command lines. You were correct that i had some names off. It works awesome now!

thanks!