in reply to Re: Serial Port
in thread Serial Port
Thanks RichardK,
I did tried adding this code
and some how when each button is pushed for $sig1, $sig2 etc...the handler sub is invoked and thats strange because only $sig4 is assigned to the handler....and the second issue is that the code is still not polling the Arduino looking for "OF"...the button has to be pressed again....The Arduino is sending data after the 8 seconds as the TX light flashes...the perl code needs to continue in a loop some how to keep looking for the "OF" trigger.$sig4->repeat(100,\&handler); sub handler { my $data = $port->lookfor; return unless $data; print STDOUT "$Message Received: (" . $data . ")\n"; exit; # THIS WAS ADDED TO MAKE SURE THE CODE DOES WORK...IT DID WORK A +ND THE PROGRAM EXITED }
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^3: Serial Port
by RichardK (Parson) on Aug 13, 2015 at 16:23 UTC | |
by PilotinControl (Pilgrim) on Aug 13, 2015 at 18:35 UTC |