fix for esp32 core 2.0.x

This commit is contained in:
Jason2866 2022-01-10 17:16:42 +01:00 committed by GitHub
parent a757b33313
commit d58f2a9ed2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 1 deletions

View File

@ -101,7 +101,8 @@ uint8_t twi_buff[64];
twi_readFrom(SPS30_ADDR,twi_buff,dlen,1);
#endif // ESP8266
#ifdef ESP32
Wire.readTransmission(SPS30_ADDR,twi_buff,dlen,1, NULL);
Wire.requestFrom((uint16_t)SPS30_ADDR, dlen, true);
Wire.readBytes(twi_buff, dlen);
#endif // ESP32
uint8_t bind=0;