epike on 21 Jan 2004 15:34:02 -0000 |
>From my old notes apparently here is where I got the wiring from: http://www.linuxfocus.org/English/January2001/article186.shtml got hte parts from radio shack. Also I drilled some holes in the front face plate of my PC case for which to put the buttons and LEDs. for the triggering program (when you press the button) there is a program called "parsled" (I lost the website link but probably is linked from the original website). The parsled program has a configuration file in which you tell it which program to launch. I put parsled in the startup script, /etc/rc.d/rc.local as in: # JondZ Sat May 31 02:59:29 EDT 2003 # Pushbutton Serial LED for JondZ' USB Picture/Loader echo Enabling Pushbutton Serial LED... /www/picturealbum/scripts/bin/parsled /www/picturealbum/etc/parsled.conf in parsled.conf I have the launch program as follows: # In this version, parsled does NOT check whether the file is owned by # user running parsled or indeed whether it is not world- or # group-writable. Please take care. You have been warned. COMMAND=/www/picturealbum/scripts/bin/picture_loader.tcsh | mail -s picloader jondz@madugas.org lots of testing involved in wich LED button lights, how much threshold you want (2 seconds to press), etc. its all in parsled. the picture_loader progarm above just mounts the disk and scans the mounted directory for JPG files, and copies them somewhere else. ONce the files are in all things are possible--I have some morning cron jobs that makes up icons and builds the website for example. Has been used for all things such as shutting down server, burning cd-roms, etc. There is also a parallel version. PLS note that I did not think about this originally, credit is due to the original authors who thought up the wiring diagram and the parsled author who authored the C program to trigger the script (I dont know C). e.pike On Tue, 20 Jan 2004 18:22:45 -0500 "eric@lucii.org" <eric@lucii.org> wrote: > > On Tue, Jan 20, 2004 at 05:05:28PM -0500, epike wrote: > > speaking of those usb drives, i have one of those > > compact flash reader that attaches to usb. > > Now i also built myself a serial pushbutton > > with LED lights indicator and used thte button > > to trigger launch a perl program (i've copied > > the wiring diagram from the internet). Teh perl > > program gobbles whatever jpg files are in the > > card. The result is i have a headless server > > which i can load my digital camera card > > into. pictures are served by ftp, samba > > and web. > > > > thought i'd like to share that. I'd have > > worked on a lcd display on the server too if > > i had enough time... > > > > e pike > > > > > > On Sun, 18 Jan 2004 16:24:56 -0500 > > sean finney <seanius@seanius.net> wrote: > > > > Could you share that diagram/site with us and tell how you get the perl > program to run from the serial input? I'd like to use something similar > for downloading pictures from my digital camera. > > TIA > > Eric > > -- > # Eric Lucas > # "Oh, I have slipped the surly bond of earth > # And danced the skies on laughter-silvered wings... > # -- John Gillespie Magee Jr. > ___________________________________________________________________________ > Philadelphia Linux Users Group -- http://www.phillylinux.org > Announcements - http://lists.phillylinux.org/mailman/listinfo/plug-announce > General Discussion -- http://lists.phillylinux.org/mailman/listinfo/plug > > ________________________________________________________________________ > This email has been scanned for all viruses by the MessageLabs Email > Security System. ___________________________________________________________________________ Philadelphia Linux Users Group -- http://www.phillylinux.org Announcements - http://lists.phillylinux.org/mailman/listinfo/plug-announce General Discussion -- http://lists.phillylinux.org/mailman/listinfo/plug
|
|