i2c_write_byte

Description

Writes a byte to a device register. Communicates with the device directly using the I2C interface.

Properties

NameRequiredTypeDescription
registeryesstringDevice register address expressed in hexadecimal. Must be prefixed with 0x and surrounded by double quotes.
valueyesstringByte value to write expressed in hexadecimal. Must be prefixed with 0x and surrounded by double quotes.
masknostringBit mask expressed in hexadecimal. Must be prefixed with 0x and surrounded by double quotes. Specifies which bits to write within the byte value. Only the bits with a value of 1 in the mask will be written.

Return Value

true

Example

{
  "i2c_write_byte": {
    "register": "0x0A",
    "value": "0xCC"
  }
}