Adafruit IS31FL3731 Library
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
Adafruit_IS31FL3731 Class Reference

Constructor for generic IS31FL3731 breakout version. More...

#include <Adafruit_IS31FL3731.h>

Inheritance diagram for Adafruit_IS31FL3731:
Adafruit_IS31FL3731_Wing

Public Member Functions

 Adafruit_IS31FL3731 (uint8_t x=16, uint8_t y=9)
 Constructor for breakout version. More...
 
bool begin (uint8_t addr=ISSI_ADDR_DEFAULT, TwoWire *theWire=&Wire)
 Initialize hardware and clear display. More...
 
void drawPixel (int16_t x, int16_t y, uint16_t color)
 Adafruit GFX low level accesssor - sets a 8-bit PWM pixel value handles rotation and pixel arrangement, unlike setLEDPWM. More...
 
void clear (void)
 Sets all LEDs on & 0 PWM for current frame.
 
void setLEDPWM (uint8_t lednum, uint8_t pwm, uint8_t bank=0)
 Low level accesssor - sets a 8-bit PWM pixel value to a bank location does not handle rotation, x/y or any rearrangements! More...
 
void audioSync (bool sync)
 Enable the audio 'sync' for brightness pulsing (not really tested) More...
 
void setFrame (uint8_t b)
 Set's this object's frame tracker (does not talk to the chip) More...
 
void displayFrame (uint8_t frame)
 Have the chip set the display to the contents of a frame. More...
 

Protected Member Functions

bool selectBank (uint8_t bank)
 Switch to a given bank in the chip memory for future reads. More...
 
bool writeRegister8 (uint8_t bank, uint8_t reg, uint8_t data)
 Write one byte to a register located in a given bank. More...
 
uint8_t readRegister8 (uint8_t bank, uint8_t reg)
 Read one byte from a register located in a given bank. More...
 

Protected Attributes

uint8_t _frame
 The frame (of 8) we are currently addressing.
 

Detailed Description

Constructor for generic IS31FL3731 breakout version.

Constructor & Destructor Documentation

◆ Adafruit_IS31FL3731()

Adafruit_IS31FL3731::Adafruit_IS31FL3731 ( uint8_t  width = 16,
uint8_t  height = 9 
)

Constructor for breakout version.

Parameters
widthDesired width of led display
heightDesired height of led display

Member Function Documentation

◆ begin()

bool Adafruit_IS31FL3731::begin ( uint8_t  addr = ISSI_ADDR_DEFAULT,
TwoWire *  theWire = &Wire 
)

Initialize hardware and clear display.

Parameters
addrThe I2C address we expect to find the chip at
theWireThe TwoWire I2C bus device to use, defaults to &Wire
Returns
True on success, false if chip isnt found

◆ drawPixel()

void Adafruit_IS31FL3731::drawPixel ( int16_t  x,
int16_t  y,
uint16_t  color 
)

Adafruit GFX low level accesssor - sets a 8-bit PWM pixel value handles rotation and pixel arrangement, unlike setLEDPWM.

Parameters
xThe x position, starting with 0 for left-most side
yThe y position, starting with 0 for top-most side
colorDespite being a 16-bit value, takes 0 (off) to 255 (max on)

◆ setLEDPWM()

void Adafruit_IS31FL3731::setLEDPWM ( uint8_t  lednum,
uint8_t  pwm,
uint8_t  bank = 0 
)

Low level accesssor - sets a 8-bit PWM pixel value to a bank location does not handle rotation, x/y or any rearrangements!

Parameters
lednumThe offset into the bank that corresponds to the LED
bankThe bank/frame we will set the data in
pwmbrightnes, from 0 (off) to 255 (max on)

◆ audioSync()

void Adafruit_IS31FL3731::audioSync ( bool  sync)

Enable the audio 'sync' for brightness pulsing (not really tested)

Parameters
syncTrue to enable, False to disable

◆ setFrame()

void Adafruit_IS31FL3731::setFrame ( uint8_t  frame)

Set's this object's frame tracker (does not talk to the chip)

Parameters
frameRanges from 0 - 7 for the 8 frames

◆ displayFrame()

void Adafruit_IS31FL3731::displayFrame ( uint8_t  frame)

Have the chip set the display to the contents of a frame.

Parameters
frameRanges from 0 - 7 for the 8 frames

◆ selectBank()

bool Adafruit_IS31FL3731::selectBank ( uint8_t  bank)
protected

Switch to a given bank in the chip memory for future reads.

Parameters
bankThe IS31 bank to switch to
Returns
False if I2C command failed to be ack'd

◆ writeRegister8()

bool Adafruit_IS31FL3731::writeRegister8 ( uint8_t  bank,
uint8_t  reg,
uint8_t  data 
)
protected

Write one byte to a register located in a given bank.

Parameters
bankThe IS31 bank to write the register location
regthe offset into the bank to write
dataThe byte value
Returns
False if I2C command failed to be ack'd

◆ readRegister8()

uint8_t Adafruit_IS31FL3731::readRegister8 ( uint8_t  bank,
uint8_t  reg 
)
protected

Read one byte from a register located in a given bank.

Parameters
bankThe IS31 bank to read the register location
regthe offset into the bank to read
Returns
1 byte value

The documentation for this class was generated from the following files: