Device-BusPirate
view release on metacpan or search on metacpan
examples/uart-hello.pl view on Meta::CPAN
) or exit 1;
my $pirate = Device::BusPirate->new(
serial => $PIRATE,
baud => $BAUD,
);
my $uart = $pirate->enter_mode( "UART" )->get;
my $config = shift // "9600,8,n,1";
my ( $baud, $bits, $parity, $stop ) = split m/,/, $config;
$uart->configure(
open_drain => 0,
baud => $baud,
bits => $bits,
parity => $parity,
stop => $stop,
)->get;
$uart->write( "Hello, world!\n" )->get;
( run in 2.170 seconds using v1.01-cache-2.11-cpan-71847e10f99 )