[EMAIL PROTECTED] writes:
> there was a fatal flaw... so this is the update..
There still is:
[...]
> while (1) {
> until (index($linebuffer,"\r") <> -1) {
> $linebuffer = $linebuffer + $port->lookfor;
Unless you mean to convert $linebuffer into a number, add another
number, and store the numeric result, this doesn't do quite what you
want.
Try: $linebuffer .= $port->lookfor;
> sleep 1; # polling sample
> time
I would suggest sampling at ~ 4 times the expected input rate, to reduce
the risk of buffer overruns in the UART. Fractional sleep should be fine.
Regards,
Daniel
--
SLUG - Sydney Linux User's Group Mailing List - http://slug.org.au/
Subscription info and FAQs: http://slug.org.au/faq/mailinglists.html