Device::VFD::GP1022 - GP1022 VFD module controller
use Device::VFD::GP1022; my $vfd = Device::VFD::GP1022->('/dev/ttyUSB0'); $vfd->message( 'messages for vfd' );
use to orignal serial module
use Device::VFD::GP1022; use Device::SerialPort; my $serial = Device::SerialPort->new('/dev/ttyUSB0') or die; # more serial port configs my $vfd = Device::VFD::GP1022->( serial => $serial ); $vfd->message( 'messages for vfd' );
this module is controller for VFD module of GP1022. It works for Unix, Mac, and Windows.
instance
文字列を引数にあたえると、その文字列をVFDに表示します。 Device::VFD::GP1022::Messageをuseする事で利用できるDSLを使用して、細かな表示制御を行えます。
特殊な呼び出しかたにより挙動を変更できます。
$vfd->message( append => 'for vfd' );
表示中の文字列に続けて表示します。
$vfd->message( 'for vfd' ); $vfd->message( force => 'for vfd' );
表示中の文字列を捨てて、即時表示します。
$vfd->message( buffer => 'for vfd' );
バッファーに文字列を蓄えます。別途 switch メソッドにてバッファを切り替えられます。
現在スクロール表示中なら真を返します。
$vfd->display; $vfd->display(1);
表示開始する。
$vfd->display(0);
表示停止する。
$vfd->scroll; $vfd->scroll(1);
スクロール開始する。
$vfd->scroll(0);
スクロール停止する。
switch to buffer
表示内容を頭出しします。
画面領域全てを使ってメッセージを描画させます。
点滅時のバックグラウンドとフォアグラウンドを切り替えます。
$vfd->reverse; $vfd->reverse(1);
切り替える。
$vfd->reverse(0);
デフォルトに戻す。
表示データ全てをクリアします。
全ての状態をデフォルトに戻します。
Kazuhiro Osawa <ko@yappo.ne.jp>
Device::VFD::GP1022::Message http://akizukidenshi.com/pdf/GP1022.pdf
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
1 POD Error
The following errors were encountered while parsing the POD:
Non-ASCII character seen before =encoding in '文字列を引数にあたえると、その文字列をVFDに表示します。'. Assuming UTF-8
To install Device::VFD::GP1022, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Device::VFD::GP1022
CPAN shell
perl -MCPAN -e shell install Device::VFD::GP1022
For more information on module installation, please visit the detailed CPAN module installation guide.