Remarks

Is31fl3731
Status Status badge: working
Source code GitHub
Datasheet(s) GitHub
NuGet package NuGet Gallery for Meadow.Foundation.ICs.IOExpanders.Is31fl3731

Code Example

Is31fl3731 iS31FL3731;

public override Task Initialize()
{
    Resolver.Log.Info("Initialize...");
    iS31FL3731 = new Is31fl3731(Device.CreateI2cBus());
    iS31FL3731.Initialize();

    return base.Initialize();
}

public override Task Run()
{
    iS31FL3731.ClearAllFrames();
    iS31FL3731.SetFrame(frame: 0);
    iS31FL3731.DisplayFrame(frame: 0);

    //Turn on all LEDs in frame
    for (byte i = 0; i <= 144; i++)
    {
        iS31FL3731.SetLedPwm(
            frame: 0,
            ledIndex: i,
            brightness: 128);

        Thread.Sleep(50);
    }

    return base.Run();
}

Sample project(s) available on GitHub

Wiring Example

To wire a Is31fl3731 to your Meadow board, connect the following:

Characteristic Locus
Inheritance object > Is31fl3731
Implements II2cPeripheral
Inherited Members object.Equals(object) object.Equals(object, object) object.GetHashCode() object.GetType() object.MemberwiseClone() object.ReferenceEquals(object, object) object.ToString()
Namespace Meadow.Foundation.ICs.IOExpanders
Assembly Is31fl3731.dll

Syntax

public class Is31fl3731 : II2cPeripheral

Constructors

Is31fl3731(II2cBus, byte)

Create a new Is31fl3731 object

Declaration
public Is31fl3731(II2cBus i2cBus, byte address = 116)

Parameters

Type Name Description
II2cBus i2cBus

The I2C bus

byte address

The I2C address

Remarks

Is31fl3731
Status Status badge: working
Source code GitHub
Datasheet(s) GitHub
NuGet package NuGet Gallery for Meadow.Foundation.ICs.IOExpanders.Is31fl3731

Code Example

Is31fl3731 iS31FL3731;

public override Task Initialize()
{
    Resolver.Log.Info("Initialize...");
    iS31FL3731 = new Is31fl3731(Device.CreateI2cBus());
    iS31FL3731.Initialize();

    return base.Initialize();
}

public override Task Run()
{
    iS31FL3731.ClearAllFrames();
    iS31FL3731.SetFrame(frame: 0);
    iS31FL3731.DisplayFrame(frame: 0);

    //Turn on all LEDs in frame
    for (byte i = 0; i <= 144; i++)
    {
        iS31FL3731.SetLedPwm(
            frame: 0,
            ledIndex: i,
            brightness: 128);

        Thread.Sleep(50);
    }

    return base.Run();
}

Sample project(s) available on GitHub

Wiring Example

To wire a Is31fl3731 to your Meadow board, connect the following:

Fields

i2cComms

I2C Communication bus used to communicate with the peripheral

Declaration
protected readonly II2cCommunications i2cComms

Field Value

Type Description
II2cCommunications

Remarks

Is31fl3731
Status Status badge: working
Source code GitHub
Datasheet(s) GitHub
NuGet package NuGet Gallery for Meadow.Foundation.ICs.IOExpanders.Is31fl3731

Code Example

Is31fl3731 iS31FL3731;

public override Task Initialize()
{
    Resolver.Log.Info("Initialize...");
    iS31FL3731 = new Is31fl3731(Device.CreateI2cBus());
    iS31FL3731.Initialize();

    return base.Initialize();
}

public override Task Run()
{
    iS31FL3731.ClearAllFrames();
    iS31FL3731.SetFrame(frame: 0);
    iS31FL3731.DisplayFrame(frame: 0);

    //Turn on all LEDs in frame
    for (byte i = 0; i <= 144; i++)
    {
        iS31FL3731.SetLedPwm(
            frame: 0,
            ledIndex: i,
            brightness: 128);

        Thread.Sleep(50);
    }

    return base.Run();
}

Sample project(s) available on GitHub

Wiring Example

To wire a Is31fl3731 to your Meadow board, connect the following:

Properties

DefaultI2cAddress

The default I2C address for the peripheral

Declaration
public byte DefaultI2cAddress { get; }

Property Value

Type Description
byte

Remarks

Is31fl3731
Status Status badge: working
Source code GitHub
Datasheet(s) GitHub
NuGet package NuGet Gallery for Meadow.Foundation.ICs.IOExpanders.Is31fl3731

Code Example

Is31fl3731 iS31FL3731;

public override Task Initialize()
{
    Resolver.Log.Info("Initialize...");
    iS31FL3731 = new Is31fl3731(Device.CreateI2cBus());
    iS31FL3731.Initialize();

    return base.Initialize();
}

public override Task Run()
{
    iS31FL3731.ClearAllFrames();
    iS31FL3731.SetFrame(frame: 0);
    iS31FL3731.DisplayFrame(frame: 0);

    //Turn on all LEDs in frame
    for (byte i = 0; i <= 144; i++)
    {
        iS31FL3731.SetLedPwm(
            frame: 0,
            ledIndex: i,
            brightness: 128);

        Thread.Sleep(50);
    }

    return base.Run();
}

Sample project(s) available on GitHub

Wiring Example

To wire a Is31fl3731 to your Meadow board, connect the following:

Frame

The current frame

Declaration
public byte Frame { get; }

Property Value

Type Description
byte

Remarks

Is31fl3731
Status Status badge: working
Source code GitHub
Datasheet(s) GitHub
NuGet package NuGet Gallery for Meadow.Foundation.ICs.IOExpanders.Is31fl3731

Code Example

Is31fl3731 iS31FL3731;

public override Task Initialize()
{
    Resolver.Log.Info("Initialize...");
    iS31FL3731 = new Is31fl3731(Device.CreateI2cBus());
    iS31FL3731.Initialize();

    return base.Initialize();
}

public override Task Run()
{
    iS31FL3731.ClearAllFrames();
    iS31FL3731.SetFrame(frame: 0);
    iS31FL3731.DisplayFrame(frame: 0);

    //Turn on all LEDs in frame
    for (byte i = 0; i <= 144; i++)
    {
        iS31FL3731.SetLedPwm(
            frame: 0,
            ledIndex: i,
            brightness: 128);

        Thread.Sleep(50);
    }

    return base.Run();
}

Sample project(s) available on GitHub

Wiring Example

To wire a Is31fl3731 to your Meadow board, connect the following:

Methods

Clear()

Turn off all LEDs for the specified frame

Declaration
public virtual void Clear()

Remarks

Is31fl3731
Status Status badge: working
Source code GitHub
Datasheet(s) GitHub
NuGet package NuGet Gallery for Meadow.Foundation.ICs.IOExpanders.Is31fl3731

Code Example

Is31fl3731 iS31FL3731;

public override Task Initialize()
{
    Resolver.Log.Info("Initialize...");
    iS31FL3731 = new Is31fl3731(Device.CreateI2cBus());
    iS31FL3731.Initialize();

    return base.Initialize();
}

public override Task Run()
{
    iS31FL3731.ClearAllFrames();
    iS31FL3731.SetFrame(frame: 0);
    iS31FL3731.DisplayFrame(frame: 0);

    //Turn on all LEDs in frame
    for (byte i = 0; i <= 144; i++)
    {
        iS31FL3731.SetLedPwm(
            frame: 0,
            ledIndex: i,
            brightness: 128);

        Thread.Sleep(50);
    }

    return base.Run();
}

Sample project(s) available on GitHub

Wiring Example

To wire a Is31fl3731 to your Meadow board, connect the following:

Clear(byte)

Turn off all LEDs for the specified frame

Declaration
public virtual void Clear(byte frame)

Parameters

Type Name Description
byte frame

the frame to clear

Remarks

Is31fl3731
Status Status badge: working
Source code GitHub
Datasheet(s) GitHub
NuGet package NuGet Gallery for Meadow.Foundation.ICs.IOExpanders.Is31fl3731

Code Example

Is31fl3731 iS31FL3731;

public override Task Initialize()
{
    Resolver.Log.Info("Initialize...");
    iS31FL3731 = new Is31fl3731(Device.CreateI2cBus());
    iS31FL3731.Initialize();

    return base.Initialize();
}

public override Task Run()
{
    iS31FL3731.ClearAllFrames();
    iS31FL3731.SetFrame(frame: 0);
    iS31FL3731.DisplayFrame(frame: 0);

    //Turn on all LEDs in frame
    for (byte i = 0; i <= 144; i++)
    {
        iS31FL3731.SetLedPwm(
            frame: 0,
            ledIndex: i,
            brightness: 128);

        Thread.Sleep(50);
    }

    return base.Run();
}

Sample project(s) available on GitHub

Wiring Example

To wire a Is31fl3731 to your Meadow board, connect the following:

ClearAllFrames()

Turn off all LEDs

Declaration
public virtual void ClearAllFrames()

Remarks

Is31fl3731
Status Status badge: working
Source code GitHub
Datasheet(s) GitHub
NuGet package NuGet Gallery for Meadow.Foundation.ICs.IOExpanders.Is31fl3731

Code Example

Is31fl3731 iS31FL3731;

public override Task Initialize()
{
    Resolver.Log.Info("Initialize...");
    iS31FL3731 = new Is31fl3731(Device.CreateI2cBus());
    iS31FL3731.Initialize();

    return base.Initialize();
}

public override Task Run()
{
    iS31FL3731.ClearAllFrames();
    iS31FL3731.SetFrame(frame: 0);
    iS31FL3731.DisplayFrame(frame: 0);

    //Turn on all LEDs in frame
    for (byte i = 0; i <= 144; i++)
    {
        iS31FL3731.SetLedPwm(
            frame: 0,
            ledIndex: i,
            brightness: 128);

        Thread.Sleep(50);
    }

    return base.Run();
}

Sample project(s) available on GitHub

Wiring Example

To wire a Is31fl3731 to your Meadow board, connect the following:

DisplayFrame(byte)

Display the specified frame

Declaration
public virtual void DisplayFrame(byte frame)

Parameters

Type Name Description
byte frame

The frame number. 0-7

Remarks

Is31fl3731
Status Status badge: working
Source code GitHub
Datasheet(s) GitHub
NuGet package NuGet Gallery for Meadow.Foundation.ICs.IOExpanders.Is31fl3731

Code Example

Is31fl3731 iS31FL3731;

public override Task Initialize()
{
    Resolver.Log.Info("Initialize...");
    iS31FL3731 = new Is31fl3731(Device.CreateI2cBus());
    iS31FL3731.Initialize();

    return base.Initialize();
}

public override Task Run()
{
    iS31FL3731.ClearAllFrames();
    iS31FL3731.SetFrame(frame: 0);
    iS31FL3731.DisplayFrame(frame: 0);

    //Turn on all LEDs in frame
    for (byte i = 0; i <= 144; i++)
    {
        iS31FL3731.SetLedPwm(
            frame: 0,
            ledIndex: i,
            brightness: 128);

        Thread.Sleep(50);
    }

    return base.Run();
}

Sample project(s) available on GitHub

Wiring Example

To wire a Is31fl3731 to your Meadow board, connect the following:

Initialize()

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

Declaration
public void Initialize()

Remarks

Is31fl3731
Status Status badge: working
Source code GitHub
Datasheet(s) GitHub
NuGet package NuGet Gallery for Meadow.Foundation.ICs.IOExpanders.Is31fl3731

Code Example

Is31fl3731 iS31FL3731;

public override Task Initialize()
{
    Resolver.Log.Info("Initialize...");
    iS31FL3731 = new Is31fl3731(Device.CreateI2cBus());
    iS31FL3731.Initialize();

    return base.Initialize();
}

public override Task Run()
{
    iS31FL3731.ClearAllFrames();
    iS31FL3731.SetFrame(frame: 0);
    iS31FL3731.DisplayFrame(frame: 0);

    //Turn on all LEDs in frame
    for (byte i = 0; i <= 144; i++)
    {
        iS31FL3731.SetLedPwm(
            frame: 0,
            ledIndex: i,
            brightness: 128);

        Thread.Sleep(50);
    }

    return base.Run();
}

Sample project(s) available on GitHub

Wiring Example

To wire a Is31fl3731 to your Meadow board, connect the following:

SelectPage(byte)

Select the page/frame

Declaration
protected virtual void SelectPage(byte page)

Parameters

Type Name Description
byte page

page/frame #

Remarks

Is31fl3731
Status Status badge: working
Source code GitHub
Datasheet(s) GitHub
NuGet package NuGet Gallery for Meadow.Foundation.ICs.IOExpanders.Is31fl3731

Code Example

Is31fl3731 iS31FL3731;

public override Task Initialize()
{
    Resolver.Log.Info("Initialize...");
    iS31FL3731 = new Is31fl3731(Device.CreateI2cBus());
    iS31FL3731.Initialize();

    return base.Initialize();
}

public override Task Run()
{
    iS31FL3731.ClearAllFrames();
    iS31FL3731.SetFrame(frame: 0);
    iS31FL3731.DisplayFrame(frame: 0);

    //Turn on all LEDs in frame
    for (byte i = 0; i <= 144; i++)
    {
        iS31FL3731.SetLedPwm(
            frame: 0,
            ledIndex: i,
            brightness: 128);

        Thread.Sleep(50);
    }

    return base.Run();
}

Sample project(s) available on GitHub

Wiring Example

To wire a Is31fl3731 to your Meadow board, connect the following:

SetBlinkFunctionOnAllLeds(bool)

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

Declaration
public virtual void SetBlinkFunctionOnAllLeds(bool on)

Parameters

Type Name Description
bool on

true = on, false = off

Remarks

Is31fl3731
Status Status badge: working
Source code GitHub
Datasheet(s) GitHub
NuGet package NuGet Gallery for Meadow.Foundation.ICs.IOExpanders.Is31fl3731

Code Example

Is31fl3731 iS31FL3731;

public override Task Initialize()
{
    Resolver.Log.Info("Initialize...");
    iS31FL3731 = new Is31fl3731(Device.CreateI2cBus());
    iS31FL3731.Initialize();

    return base.Initialize();
}

public override Task Run()
{
    iS31FL3731.ClearAllFrames();
    iS31FL3731.SetFrame(frame: 0);
    iS31FL3731.DisplayFrame(frame: 0);

    //Turn on all LEDs in frame
    for (byte i = 0; i <= 144; i++)
    {
        iS31FL3731.SetLedPwm(
            frame: 0,
            ledIndex: i,
            brightness: 128);

        Thread.Sleep(50);
    }

    return base.Run();
}

Sample project(s) available on GitHub

Wiring Example

To wire a Is31fl3731 to your Meadow board, connect the following:

SetBlinkFunctionOnAllLeds(byte, bool)

Blink all the LEDs for the specified frame

Declaration
public virtual void SetBlinkFunctionOnAllLeds(byte frame, bool on)

Parameters

Type Name Description
byte frame

frame #

bool on

true = on, false = off

Remarks

Is31fl3731
Status Status badge: working
Source code GitHub
Datasheet(s) GitHub
NuGet package NuGet Gallery for Meadow.Foundation.ICs.IOExpanders.Is31fl3731

Code Example

Is31fl3731 iS31FL3731;

public override Task Initialize()
{
    Resolver.Log.Info("Initialize...");
    iS31FL3731 = new Is31fl3731(Device.CreateI2cBus());
    iS31FL3731.Initialize();

    return base.Initialize();
}

public override Task Run()
{
    iS31FL3731.ClearAllFrames();
    iS31FL3731.SetFrame(frame: 0);
    iS31FL3731.DisplayFrame(frame: 0);

    //Turn on all LEDs in frame
    for (byte i = 0; i <= 144; i++)
    {
        iS31FL3731.SetLedPwm(
            frame: 0,
            ledIndex: i,
            brightness: 128);

        Thread.Sleep(50);
    }

    return base.Run();
}

Sample project(s) available on GitHub

Wiring Example

To wire a Is31fl3731 to your Meadow board, connect the following:

SetBlinkMode(bool, byte)

Enable/disable blink mode

Declaration
public virtual void SetBlinkMode(bool enabled, byte period)

Parameters

Type Name Description
bool enabled

true = on, false = off

byte period

the blink duration

Remarks

Is31fl3731
Status Status badge: working
Source code GitHub
Datasheet(s) GitHub
NuGet package NuGet Gallery for Meadow.Foundation.ICs.IOExpanders.Is31fl3731

Code Example

Is31fl3731 iS31FL3731;

public override Task Initialize()
{
    Resolver.Log.Info("Initialize...");
    iS31FL3731 = new Is31fl3731(Device.CreateI2cBus());
    iS31FL3731.Initialize();

    return base.Initialize();
}

public override Task Run()
{
    iS31FL3731.ClearAllFrames();
    iS31FL3731.SetFrame(frame: 0);
    iS31FL3731.DisplayFrame(frame: 0);

    //Turn on all LEDs in frame
    for (byte i = 0; i <= 144; i++)
    {
        iS31FL3731.SetLedPwm(
            frame: 0,
            ledIndex: i,
            brightness: 128);

        Thread.Sleep(50);
    }

    return base.Run();
}

Sample project(s) available on GitHub

Wiring Example

To wire a Is31fl3731 to your Meadow board, connect the following:

SetFrame(byte)

Sets the current frame.

Declaration
public virtual void SetFrame(byte frame)

Parameters

Type Name Description
byte frame

The frame number. 0-7

Remarks

Is31fl3731
Status Status badge: working
Source code GitHub
Datasheet(s) GitHub
NuGet package NuGet Gallery for Meadow.Foundation.ICs.IOExpanders.Is31fl3731

Code Example

Is31fl3731 iS31FL3731;

public override Task Initialize()
{
    Resolver.Log.Info("Initialize...");
    iS31FL3731 = new Is31fl3731(Device.CreateI2cBus());
    iS31FL3731.Initialize();

    return base.Initialize();
}

public override Task Run()
{
    iS31FL3731.ClearAllFrames();
    iS31FL3731.SetFrame(frame: 0);
    iS31FL3731.DisplayFrame(frame: 0);

    //Turn on all LEDs in frame
    for (byte i = 0; i <= 144; i++)
    {
        iS31FL3731.SetLedPwm(
            frame: 0,
            ledIndex: i,
            brightness: 128);

        Thread.Sleep(50);
    }

    return base.Run();
}

Sample project(s) available on GitHub

Wiring Example

To wire a Is31fl3731 to your Meadow board, connect the following:

SetLedPwm(byte, byte)

Set the PWM value for the specified LED

Declaration
public virtual void SetLedPwm(byte ledIndex, byte pwm)

Parameters

Type Name Description
byte ledIndex

The LED number

byte pwm

The pwm value 0-255

Remarks

Is31fl3731
Status Status badge: working
Source code GitHub
Datasheet(s) GitHub
NuGet package NuGet Gallery for Meadow.Foundation.ICs.IOExpanders.Is31fl3731

Code Example

Is31fl3731 iS31FL3731;

public override Task Initialize()
{
    Resolver.Log.Info("Initialize...");
    iS31FL3731 = new Is31fl3731(Device.CreateI2cBus());
    iS31FL3731.Initialize();

    return base.Initialize();
}

public override Task Run()
{
    iS31FL3731.ClearAllFrames();
    iS31FL3731.SetFrame(frame: 0);
    iS31FL3731.DisplayFrame(frame: 0);

    //Turn on all LEDs in frame
    for (byte i = 0; i <= 144; i++)
    {
        iS31FL3731.SetLedPwm(
            frame: 0,
            ledIndex: i,
            brightness: 128);

        Thread.Sleep(50);
    }

    return base.Run();
}

Sample project(s) available on GitHub

Wiring Example

To wire a Is31fl3731 to your Meadow board, connect the following:

SetLedPwm(byte, byte, byte)

Set the PWM value for the specified LED

Declaration
public virtual void SetLedPwm(byte frame, byte ledIndex, byte brightness)

Parameters

Type Name Description
byte frame

Frame number. 0-7

byte ledIndex

The LED number. 0-144

byte brightness

The pwm value 0-255

Remarks

Is31fl3731
Status Status badge: working
Source code GitHub
Datasheet(s) GitHub
NuGet package NuGet Gallery for Meadow.Foundation.ICs.IOExpanders.Is31fl3731

Code Example

Is31fl3731 iS31FL3731;

public override Task Initialize()
{
    Resolver.Log.Info("Initialize...");
    iS31FL3731 = new Is31fl3731(Device.CreateI2cBus());
    iS31FL3731.Initialize();

    return base.Initialize();
}

public override Task Run()
{
    iS31FL3731.ClearAllFrames();
    iS31FL3731.SetFrame(frame: 0);
    iS31FL3731.DisplayFrame(frame: 0);

    //Turn on all LEDs in frame
    for (byte i = 0; i <= 144; i++)
    {
        iS31FL3731.SetLedPwm(
            frame: 0,
            ledIndex: i,
            brightness: 128);

        Thread.Sleep(50);
    }

    return base.Run();
}

Sample project(s) available on GitHub

Wiring Example

To wire a Is31fl3731 to your Meadow board, connect the following:

SetLedState(bool)

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

Declaration
public virtual void SetLedState(bool on)

Parameters

Type Name Description
bool on

true = on, false = off

Remarks

Is31fl3731
Status Status badge: working
Source code GitHub
Datasheet(s) GitHub
NuGet package NuGet Gallery for Meadow.Foundation.ICs.IOExpanders.Is31fl3731

Code Example

Is31fl3731 iS31FL3731;

public override Task Initialize()
{
    Resolver.Log.Info("Initialize...");
    iS31FL3731 = new Is31fl3731(Device.CreateI2cBus());
    iS31FL3731.Initialize();

    return base.Initialize();
}

public override Task Run()
{
    iS31FL3731.ClearAllFrames();
    iS31FL3731.SetFrame(frame: 0);
    iS31FL3731.DisplayFrame(frame: 0);

    //Turn on all LEDs in frame
    for (byte i = 0; i <= 144; i++)
    {
        iS31FL3731.SetLedPwm(
            frame: 0,
            ledIndex: i,
            brightness: 128);

        Thread.Sleep(50);
    }

    return base.Run();
}

Sample project(s) available on GitHub

Wiring Example

To wire a Is31fl3731 to your Meadow board, connect the following:

SetLedState(byte, bool)

Sets the state for all LEDs for the specified frame

Declaration
public virtual void SetLedState(byte frame, bool on)

Parameters

Type Name Description
byte frame
bool on

true = on, false = off

Remarks

Is31fl3731
Status Status badge: working
Source code GitHub
Datasheet(s) GitHub
NuGet package NuGet Gallery for Meadow.Foundation.ICs.IOExpanders.Is31fl3731

Code Example

Is31fl3731 iS31FL3731;

public override Task Initialize()
{
    Resolver.Log.Info("Initialize...");
    iS31FL3731 = new Is31fl3731(Device.CreateI2cBus());
    iS31FL3731.Initialize();

    return base.Initialize();
}

public override Task Run()
{
    iS31FL3731.ClearAllFrames();
    iS31FL3731.SetFrame(frame: 0);
    iS31FL3731.DisplayFrame(frame: 0);

    //Turn on all LEDs in frame
    for (byte i = 0; i <= 144; i++)
    {
        iS31FL3731.SetLedPwm(
            frame: 0,
            ledIndex: i,
            brightness: 128);

        Thread.Sleep(50);
    }

    return base.Run();
}

Sample project(s) available on GitHub

Wiring Example

To wire a Is31fl3731 to your Meadow board, connect the following:

WriteRegister(byte, byte)

Write to the current frame register

Declaration
protected virtual void WriteRegister(byte register, byte data)

Parameters

Type Name Description
byte register

Register to write to

byte data

The data value

Remarks

Is31fl3731
Status Status badge: working
Source code GitHub
Datasheet(s) GitHub
NuGet package NuGet Gallery for Meadow.Foundation.ICs.IOExpanders.Is31fl3731

Code Example

Is31fl3731 iS31FL3731;

public override Task Initialize()
{
    Resolver.Log.Info("Initialize...");
    iS31FL3731 = new Is31fl3731(Device.CreateI2cBus());
    iS31FL3731.Initialize();

    return base.Initialize();
}

public override Task Run()
{
    iS31FL3731.ClearAllFrames();
    iS31FL3731.SetFrame(frame: 0);
    iS31FL3731.DisplayFrame(frame: 0);

    //Turn on all LEDs in frame
    for (byte i = 0; i <= 144; i++)
    {
        iS31FL3731.SetLedPwm(
            frame: 0,
            ledIndex: i,
            brightness: 128);

        Thread.Sleep(50);
    }

    return base.Run();
}

Sample project(s) available on GitHub

Wiring Example

To wire a Is31fl3731 to your Meadow board, connect the following:

WriteRegister(byte, byte, byte)

Write a value to a register

Declaration
protected virtual void WriteRegister(byte frame, byte register, byte data)

Parameters

Type Name Description
byte frame

The frame

byte register

Register to write to

byte data

The data value

Remarks

Is31fl3731
Status Status badge: working
Source code GitHub
Datasheet(s) GitHub
NuGet package NuGet Gallery for Meadow.Foundation.ICs.IOExpanders.Is31fl3731

Code Example

Is31fl3731 iS31FL3731;

public override Task Initialize()
{
    Resolver.Log.Info("Initialize...");
    iS31FL3731 = new Is31fl3731(Device.CreateI2cBus());
    iS31FL3731.Initialize();

    return base.Initialize();
}

public override Task Run()
{
    iS31FL3731.ClearAllFrames();
    iS31FL3731.SetFrame(frame: 0);
    iS31FL3731.DisplayFrame(frame: 0);

    //Turn on all LEDs in frame
    for (byte i = 0; i <= 144; i++)
    {
        iS31FL3731.SetLedPwm(
            frame: 0,
            ledIndex: i,
            brightness: 128);

        Thread.Sleep(50);
    }

    return base.Run();
}

Sample project(s) available on GitHub

Wiring Example

To wire a Is31fl3731 to your Meadow board, connect the following: