Merge pull request #14378 from Jason2866/sps30

sps30 driver fix for esp32 core 2.0.x
This commit is contained in:
Jason2866 2022-01-11 12:39:07 +01:00 committed by GitHub
commit 13ff5a5e11
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;