HiPi
Perl Modules for Raspberry Pi
Version 0.92 - released 28 March 2024

HiPi::Interface::IS31FL3730

This module provides an interface to the IS31FL3730 LED matrix controller.

It is implemented to support the HiPi::Interface::MicroDotPHAT module.

It uses HiPi::Device::I2C as a backend.

Methods

Create a new instance of the class

use HiPi qw( :fl3730 );
use HiPi::Interface::IS31FL3730;

my $if = HiPi::Interface::IS31FL3730->new( address => 0x60 );

Send the reset command to the IS31FL3730

$if->reset()

Write $configbyte to the configuration register.

Constants are provided for the configuration values.

use HiPi qw( :fl3730 );
use HiPi::Interface::IS31FL3730;
my $if = HiPi::Interface::IS31FL3730->new( address => 0x60 );
$if->configure( FL3730_SSD_NORMAL | FL3730_DM_MATRIX_BOTH | FL3730_AEN_OFF | FL3730_ADM_8X8 );

Write $lightbyte to the lighting effect register.

Constants are provided for the lighting effect values.

use HiPi qw( :fl3730 );
...
$if->lighting_effect( FL3730_AGS_0_DB | FL3730_CS_35_MA );

Set the LED brightness value.

$val should be between 0 and 128

$if->brightness( 75 );

Write the required bytes to the first matrix buffer

$if->matrix_1_data( @bytes);

Write the required bytes to the second matrix buffer

$if->matrix_2_data( @bytes);

Update the LED display

$if->update();

Send bytes to the IS31FL3730 without using the wrapper methods.

The first byte is always the command register you wish to write to.

$if->send_command( @bytes );