Raspberry Pi - I2C Communication
Identify the error in the following code snippet that writes to an I2C device and suggest the fix:
from smbus2 import SMBus bus = SMBus(1) bus.write_byte_data(0x40, 0x02) bus.close()
