[mythtv-users] Recording LED light possible?

Thomas Kuster mythtv.debian at fam-kuster.ch
Wed Mar 24 02:44:06 EST 2004


hello

Am Wednesday 24 March 2004 02:08 schrieb mark:
> Yeah, I think that would do it.  I need to figure out how to
> integrate it into a parallel port output device.

just use cat;-)

example in perl:

@Data = ("0","0","0","0","0","0","0","0");
1 on, 0 off

if (open(INTERFACE, ">/dev/lp0")) #Wenn es geht auf das Interface 
schreiben
  {
   print INTERFACE chr( $Data[0] + $Data[1]*2 + $Data[2]*4 + $Data[3]*8 
+ $Data[4]*16 + $Data[5]*32 + $Data[6]*64 + $Data[7]*128);

   close(INTERFACE);

   print $Kanalnummer, $Zustand =~ 0 ? " ausgeschaltet<br>\n" : " 
eingeschaltet<br>\n";
  }

see:
http://f24.parsimony.net/forum54930/messages/18666.htm

if you have only one LED send 0 or 1 to lp0 with echo "0" >/dev/lp0

bye
thomas


More information about the mythtv-users mailing list