#!/usr/bin/perl

use v5.26;
use warnings;

use Device::Chip::BV4243;
use Device::Chip::Adapter;

use Future::AsyncAwait;
use Getopt::Long;

GetOptions(
   'adapter|A=s' => \my $ADAPTER,
) or exit 1;

my $chip = Device::Chip::BV4243->new;
await $chip->mount(
   Device::Chip::Adapter->new_from_description( $ADAPTER )
);

# Clear and home
await $chip->lcd_command( 0x01 );
await $chip->lcd_string( $ARGV[0] // "Hello, world!" );