Raspberry Pi - I2C Communication
What will be the output of this code snippet?
Assuming the device echoes back the written byte.
from smbus2 import SMBus
with SMBus(1) as bus:
bus.write_byte_data(0x30, 0x05, 0xFF)
result = bus.read_byte_data(0x30, 0x05)
print(result)Assuming the device echoes back the written byte.
