The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

Device::VFD::GP1022 - GP1022 VFD module controller

SYNOPSIS

  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' );

DESCRIPTION

this module is controller for VFD module of GP1022. It works for Unix, Mac, and Windows.

METHODS

new

instance

message

文字列を引数にあたえると、その文字列を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 メソッドにてバッファを切り替えられます。

is_scroll

現在スクロール表示中なら真を返します。

display
  $vfd->display;
  $vfd->display(1);

表示開始する。

  $vfd->display(0);

表示停止する。

scroll
  $vfd->scroll;
  $vfd->scroll(1);

スクロール開始する。

  $vfd->scroll(0);

スクロール停止する。

switch

switch to buffer

rewind

表示内容を頭出しします。

full

画面領域全てを使ってメッセージを描画させます。

reverse

点滅時のバックグラウンドとフォアグラウンドを切り替えます。

  $vfd->reverse;
  $vfd->reverse(1);

切り替える。

  $vfd->reverse(0);

デフォルトに戻す。

clear

表示データ全てをクリアします。

default

全ての状態をデフォルトに戻します。

AUTHOR

Kazuhiro Osawa <ko@yappo.ne.jp>

SEE ALSO

Device::VFD::GP1022::Message http://akizukidenshi.com/pdf/GP1022.pdf

LICENSE

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:

Around line 237:

Non-ASCII character seen before =encoding in '文字列を引数にあたえると、その文字列をVFDに表示します。'. Assuming UTF-8