Redlion Druckanzeiger PAXP auslesen
#****************************************************************
#!/usr/bin/perl
use strict;
use warnings;
#Redlion PAXP pressure read
### Define Seriell Port
my $port = "/dev/ttyS4"; # like COM5
### Set Port with stty
system "stty 9600 -oddp -ixoff -echo < $port";
### open Port as COM
open(COM, "+>$port") or die "can't open $port";
select(COM); # COM as standart E/A
$| = 1; # Character one by one = no buffer
### Send TA to PAXP asks for INPut Value
print("TA*\015");
sleep(1); # 9600 BPS could be slow ...
sysread(COM, my ($line), 20);
$line =~ s/ *//g; # kill blanks
close(COM);
select(STDOUT);
print("Mainz ". $line); # Print to Standartout
#****************************************************************