Hall i2c
hi I'm trying to write some code to read on i2c an as 4058b encoder with the HALL library with stm32, with arduino it works perfectly:
Wire.beginTransmission (_slaveAdress);
Wire.write (internal_register
);
Wire.endTransmission ();
Wire.requestFrom (_slaveAddress, nbByte2Read);
for (bytes i = 0; i <nbByte2Read; i ++) {
readArray [i] = Wire.read ();
}
readValue = (((uint16_t) readArray [0]) << 6);
readValue + = (readArray [1] & 0x3F);
Could you have an equal reproduction of code with HALL i2c?
thank you