Developers unattended – Build your own Sith Lord
2009 Dezember 28
For the last couple of years I received a giveaway from Icoya each Christmas since I had to integrate a digital signature solution from this supplier. Well, I wasn’t too excited about last year’s gift (a wrist pad and a flashing bouncing ball). This year they sent a conference speaker which much more attracted my attention.
Since my laptop still covers all features this speaker supplies, I set up the installation below, together with Steffen.
Ingredients:
- The icoya USB conference speaker
- A Darth Vader helmet purchased years ago.
- An “I-am-your-father” audio sample.
- A simple cardboard box.
- A USB panic button
- A Linux operating PC and some perl script magic
Steps
- Connect both USB panic button and the conference speaker to the computer
- Mount the conference speaker on the cardboard box

- Put the Darth Vader helmet on the speaker
- Run the following script (Thanks again to Steffen)
#!//usr/bin/perl
use Device::USB::PanicButton;
my $pbutton = Device::USB::PanicButton->new();
if(!$pbutton || $pbutton->error()) {
printf(STDERR "FATAL: ". $pbutton->error() ."\n");
exit(-1);
}
while(1) {
my $result = $pbutton->pressed();
if($result == 1) {
printf("PANIC ; )\n");
`mplayer /home/somebody/my_darth_vader_i_am_your_father_sample.mp3 -ao oss:/dev/dsp1`;
} elsif($result < 0) { printf(STDERR "WARN: ". $pbutton->error() ."\n");
}
}
Push Panic Button and have fun!
Wish you a funny new year, people out there!
No comments yet


