Skip to content

[Question] How to write data with REGISTER using I2C #1401

@scegg

Description

@scegg

Hi.

I need to translate a code block written in python to C#.

The python block is

bus = SMBus(1)
address = 0x3C
bus.write_byte_data(address, 0x40, value)

Here is my C# block

_i2cBus = I2cBus.Create(1);
_i2cDevice = _i2cBus.CreateDevice(0x3C);
_i2cDevice.WriteByte(value); //Problem

value is a byte.

Problem is how to transfer the REGISTER (0x40)?

Thanks.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions