NAME

HiPi::Control::LCD::HTBackpackV2

VERSION

Version 0.01

SYNOPSYS

    use HiPi::Constant qw( :raspberry :pinmode :serial
        :spi :i2c :wiring :bcm2835 :mcp23017 :htv2cmd
        :htv2baudrate );
    
    use HiPi::Control::LCD qw( :cursor :hd44780 );
    use HiPi::Control::LCD::HTBackpackV2;
    
    my $hp = HiPi::Control::LCD::HTBackpackV2->new(
        { width => 16, lines => 2, backlightcontrol => 1, devicetype => 'serialrx' } );
    # my $hp = HiPi::Control::LCD::HTBackpackV2->new(
    #   { width => 16, lines => 4, backlightcontrol => 1, devicetype => 'i2c' } );
    
    $hp->enable(1);
		
    $hp->backlight(25);
    $hp->clear;

    $hp->set_cursor_position(0,0);
    $hp->send_text('Raspberry Pi');

    $hp->set_cursor_position(0,1);
    $hp->send_text('HobbyTronics Backpack');

DESCRIPTION

This module inherits from HiPi::Control::LCD to provide an access to the HobbyTronics Version 2 Backpack (serialRX and I2C ) LCD interface.

METHODS

Common methods used by all HiPi::Control::LCD::xx classes can be found in the HiPi::Control::LCD pod.

HiPi::Control::LCD::HTBackpackV2 specific methods are

change_i2c_address

$lcd->change_i2c_address($newaddress);

Change the I2C address if using in i2c mode.

The i2c address must be in the range 1 - 127 ( 0x01 - 0x7F )

LICENSE

This work is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 3 of the License, or any later version.

License Note

I would normally release any Perl code under the Perl Artistic License but this module wraps several GPL / LGPL C libraries and I feel that the licensing of the entire distribution is simpler if the Perl code is under GPL too.

AUTHOR

Mark Dootson, <mdootson at cpan.org>

COPYRIGHT

Copyright (C) 2012-2013 Mark Dootson, all rights reserved.