"Gainer over HTTP" and the Device::Gainer module for Perl

Gainer is one of the hottest gadgets now.
This weekend, I got the module lent by Shuhei Terai, my colleague and a great Flash/ActionScript developer a.k.a. Trick7.
Gainer is an environment for user interfaces and media installations. By using the Gainer environment, the user can handle sensors and/or actuators with a PC on various programming environments such as Flash, Max/MSP, Processing and so on.
http://gainer.cc/Main/HomePage?userlang=en

Gainer supports some of LLs, ActionScript and Ruby (with Funnel).
Perl is not supported yet unfortunately.


So I wrote a Perl module named Device::Gainer and submitted on CodeRepos:
http://svn.coderepos.org/share/lang/perl/Device-Gainer/trunk/lib/Device/Gainer.pm

SYNOPSIS:
use Device::Gainer;
my $gainer = Device::Gainer->new( host => '192.168.1.xx' );
$gainer->on_pressed( sub { print "PRESS\n"; } );
$gainer->on_released( sub { print "RELEASE\n"; } );
$gainer->turn_on_led();
$gainer->turn_off_led();
The module has enough functionality for my purpose, however,
it's not completed especially for documents and tests.
The following methods are supported currently:

MethodCommand
turn_on_ledh*
turn_off_ledl*
digital_outputD____*
set_highH_*
set_lowL_*
peek_digital_inputR*
analog_outputa___*
peek_analog_inputI*
on_pressedN*
on_releasedF*

Anyway, I wrote a proxy server for "Gainer over HTTP" using the Device::Gainer and POE::Component::Server::HTTP module.


Now we can use the Gainer through the Internet!
This means the Gainer Ajax tech can be the hot topics in the Ajax/JavaScript developers as well...


I failed to use Win32::SerialPort module to connect to Gainer module directly.

The original posts of this were written in Japanese.