i used to use arduino as a i2c communication device but i'm changing to raspberry and i have a question about how to send and receive data from raspberry to my device
the device in question is a pressure and temperature sensor, the sensor address is 0x78
i need to send 0xAC, wait some time and then request 6 bytes
the arduino code is the following:
Wire.beginTransmission(0x78);
Wire.write(0xAC);
Wire.endTransmission();
delay(50);
Wire.requestFrom(0x78, 6); // request 6 bytes
if (Wire.available() == 6) { // read 6 bytes :status, BridgeDat1, BridgeDat2, BridgeDat3, TempDat1, TempDat2
data[0] = Wire.read(); //status
data[1] = Wire.read(); //BridgeDat1
data[2] = Wire.read(); //BridgeDat2
data[3] = Wire.read(); //BridgeDat3
data[4] = Wire.read(); //TempDat1
data[5] = Wire.read(); //TempDat2
}
my question is, how to do that in python ??