Return a byte from an i2c device
Usage
rpi_i2c_get(chip_address, data_address, data_size = "b")
Arguments
- chip_address
an integer between 0x03 and 0x77. Use i2cdetect -y 1 to identify the address
- data_address
an integer between 0x00 and 0xFF. This will come from the chip documentation
- data_size
read a byte (b) or a word (w) from data_address
Value
data from the i2c device located at chip_address and data_address
Examples
if (FALSE) { # is.rpi()
#' # get a byte from an i2c device located at 0x77
rpi_i2c_get(chip_address = 0x77, data_address = 0xfa, data_size = "b")
}