From d58f2a9ed2778aa237980ca683901be51104d420 Mon Sep 17 00:00:00 2001 From: Jason2866 <24528715+Jason2866@users.noreply.github.com> Date: Mon, 10 Jan 2022 17:16:42 +0100 Subject: [PATCH] fix for esp32 core 2.0.x --- tasmota/xsns_44_sps30.ino | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tasmota/xsns_44_sps30.ino b/tasmota/xsns_44_sps30.ino index 569a821b3..1af0a7127 100644 --- a/tasmota/xsns_44_sps30.ino +++ b/tasmota/xsns_44_sps30.ino @@ -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;