Skip to main content

Class Is31fl3731

Represents the IS31FL3731 IC The Is31fl3731 is a compact LED driver for 144 single LEDs

Assembly: Is31fl3731.dll
View Source
public class Is31fl3731 : II2cPeripheral

Implements:
Meadow.Hardware.II2cPeripheral

Properties

DefaultI2cAddress

The default I2C address for the peripheral

View Source
public byte DefaultI2cAddress { get; }

Frame

The current frame

View Source
public byte Frame { get; }

Fields

i2cComms

I2C Communication bus used to communicate with the peripheral

View Source
protected readonly II2cCommunications i2cComms

Methods

Initialize()

Initialize the IS31FL3731 by shutting it down, turning it back on and setting it to Picture mode.

View Source
public void Initialize()

SetLedState(bool)

Set the LED state for all LED's in the current Frame

View Source
public virtual void SetLedState(bool on)
Parameters
TypeNameDescription
System.Booleanontrue = on, false = off

SetLedState(byte, bool)

Sets the state for all LEDs for the specified frame

View Source
public virtual void SetLedState(byte frame, bool on)
Parameters
TypeNameDescription
System.Byteframe
System.Booleanontrue = on, false = off

WriteRegister(byte, byte)

Write to the current frame register

View Source
protected virtual void WriteRegister(byte register, byte data)
Parameters
TypeNameDescription
System.ByteregisterRegister to write to
System.BytedataThe data value

WriteRegister(byte, byte, byte)

Write a value to a register

View Source
protected virtual void WriteRegister(byte frame, byte register, byte data)
Parameters
TypeNameDescription
System.ByteframeThe frame
System.ByteregisterRegister to write to
System.BytedataThe data value

SetBlinkMode(bool, byte)

Enable/disable blink mode

View Source
public virtual void SetBlinkMode(bool enabled, byte period)
Parameters
TypeNameDescription
System.Booleanenabledtrue = on, false = off
System.Byteperiodthe blink duration

Clear()

Turn off all LEDs for the specified frame

View Source
public virtual void Clear()

Clear(byte)

Turn off all LEDs for the specified frame

View Source
public virtual void Clear(byte frame)
Parameters
TypeNameDescription
System.Byteframethe frame to clear

ClearAllFrames()

Turn off all LEDs

View Source
public virtual void ClearAllFrames()

SetLedPwm(byte, byte)

Set the PWM value for the specified LED

View Source
public virtual void SetLedPwm(byte ledIndex, byte pwm)
Parameters
TypeNameDescription
System.ByteledIndexThe LED number
System.BytepwmThe pwm value 0-255

SetLedPwm(byte, byte, byte)

Set the PWM value for the specified LED

View Source
public virtual void SetLedPwm(byte frame, byte ledIndex, byte brightness)
Parameters
TypeNameDescription
System.ByteframeFrame number. 0-7
System.ByteledIndexThe LED number. 0-144
System.BytebrightnessThe pwm value 0-255

DisplayFrame(byte)

Display the specified frame

View Source
public virtual void DisplayFrame(byte frame)
Parameters
TypeNameDescription
System.ByteframeThe frame number. 0-7

SetFrame(byte)

Sets the current frame.

View Source
public virtual void SetFrame(byte frame)
Parameters
TypeNameDescription
System.ByteframeThe frame number. 0-7

SetBlinkFunctionOnAllLeds(bool)

Blink all LEDs for the current frame. Blink Mode muse be enabled

View Source
public virtual void SetBlinkFunctionOnAllLeds(bool on)
Parameters
TypeNameDescription
System.Booleanontrue = on, false = off

SetBlinkFunctionOnAllLeds(byte, bool)

Blink all the LEDs for the specified frame

View Source
public virtual void SetBlinkFunctionOnAllLeds(byte frame, bool on)
Parameters
TypeNameDescription
System.Byteframeframe #
System.Booleanontrue = on, false = off

SelectPage(byte)

Select the page/frame

View Source
protected virtual void SelectPage(byte page)
Parameters
TypeNameDescription
System.Bytepagepage/frame #

Implements

  • Meadow.Hardware.II2cPeripheral