From: David N. <jud...@ad...> - 2002-07-26 16:17:21
|
Check out the unpack function. ----- Original Message ----- From: "Neil Cherry" <nc...@co...> To: <mis...@li...> Sent: Friday, July 26, 2002 7:16 AM Subject: [misterhouse-users] Serial port data > When I read serial port data how do I convert the data from whatever comes > in to bytes so the I can use something like the following: > > &main::check_for_generic_serial_data('hcs_II'); > my $data = $main::Serial_Ports{hcs_II}{data}; > $main::Serial_Ports{hcs_II}{data} = ''; > return unless $data; > @list = split(//, $data); > > if($list[0] == 0x80) { ... } > > -- > Linux Home Automation Neil Cherry nc...@co... > http://mywebpages.comcast.net/ncherry/ (Text only) > http://linuxha.sourceforge.net/ (SourceForge) > http://hcs.sourceforge.net/ (HCS II) > > > > ------------------------------------------------------- > This sf.net email is sponsored by:ThinkGeek > Welcome to geek heaven. > http://thinkgeek.com/sf > ________________________________________________________ > To unsubscribe from this list, go to: http://sourceforge.net/mail/?group_id=1365 > |