On external event (usb ? gpio ?) launch a script - Raspberry Pi Forums
hello
bought raspberry pi in order control lights , sounds in diy arcade cabinet.
wanted have startup sound (among other effects) when switch on arcade cabinet (which includes mini pc , external consoles inputs).
arcade cabinet built has special powerstrip powers "slaves" devices when device plugged on "master" socket switched on. mini pc , external consoles plugged on master socket, while marquee light, screen, , speakers plugged on slaves sockets. switching on pc or external console switches on screen, lights, , speakers automatically.
plan power on automatically raspberry pi same process, when internal pc (or external console) switched on, , have raspberry play sound through script @ startup. therefore give impression of "startup sound".
managed not expecting such long boot time (currently, between switch on, , playing of sound, it's 30 seconds. i'm using raspbian wheezy, cli mode, headless).
since guess delay won't reduced, thinking of having raspberry switched on inside cabinet, , "listening" external event (such voltage change somewhere somehow?) trigger script plays startup sound.
i'm total noob gpio guess should doable. advices ?
otherwise, having script launched when usb device plugged rpi switched on, acceptable alternative, i'm out of ideas. let's rpi able launch script when usb thumb drive switched on, , find usb hub plugs drive when powered on, example.
appreciated !
in advance
bought raspberry pi in order control lights , sounds in diy arcade cabinet.
wanted have startup sound (among other effects) when switch on arcade cabinet (which includes mini pc , external consoles inputs).
arcade cabinet built has special powerstrip powers "slaves" devices when device plugged on "master" socket switched on. mini pc , external consoles plugged on master socket, while marquee light, screen, , speakers plugged on slaves sockets. switching on pc or external console switches on screen, lights, , speakers automatically.
plan power on automatically raspberry pi same process, when internal pc (or external console) switched on, , have raspberry play sound through script @ startup. therefore give impression of "startup sound".
managed not expecting such long boot time (currently, between switch on, , playing of sound, it's 30 seconds. i'm using raspbian wheezy, cli mode, headless).
since guess delay won't reduced, thinking of having raspberry switched on inside cabinet, , "listening" external event (such voltage change somewhere somehow?) trigger script plays startup sound.
i'm total noob gpio guess should doable. advices ?
otherwise, having script launched when usb device plugged rpi switched on, acceptable alternative, i'm out of ideas. let's rpi able launch script when usb thumb drive switched on, , find usb hub plugs drive when powered on, example.
appreciated !
in advance
raspberrypi
Comments
Post a Comment