Closed Alex-Ga closed 1 year ago
Wire.requestFrom(...) should not be encapsulated by a Transmission. The begin/end Transmission is only needed for sending data to a I²C slave by send(). https://playground.arduino.cc/Main/WireLibraryDetailedReference#beginTransmission
while(!Wire.available()) {}; is also not needed. When Wire.requestFrom() has returned the I2C transmission has ended and the data is in the buffer.
You are right. The begin transmission makes now an esp32-s2 hang.
So we can say "should not be encapsulated"
solved in next release
Wire.requestFrom(...) should not be encapsulated by a Transmission. The begin/end Transmission is only needed for sending data to a I²C slave by send(). https://playground.arduino.cc/Main/WireLibraryDetailedReference#beginTransmission
while(!Wire.available()) {}; is also not needed. When Wire.requestFrom() has returned the I2C transmission has ended and the data is in the buffer.