Skip to content

How to read I2C data without sending a command? #129

@ea7kir

Description

@ea7kir

Raspberry Pi 4B, RASPIO 64 bit Bullseye Lite, Swift Version 5.5

For example, to read the Status Register of an SHT31 (datasheet page 13)

Screenshot 2021-12-06 at 15 09 56

would require...

i2c.writeByte(0x44, command: 0xF3, value: 0x2D)
let data = i2c.readData(0x44) // would return 6 bytes, but this is not possible.

It would also be helpful to be able to send word commands like this...

i2c.writeWord(0x44, command: 0xF32D)

Any help with this would be most helpful, because I'm completely stuck.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions