Dear forum members,
some weeks ago i ordered a soil moisture sensor from china (like this: https://de.aliexpress.com/item/Soil-tem ... 08137.html), unfortunately i thought ESPeasy support all sht-series. Now i've got one with SHT20 - Sensor and won't get it working.
I tried Sl7021 Module via I2C, tried adopting the SHT3X-module from forum (https://www.letscontrolit.com/forum/vie ... php?t=2363), only resulting in Read errors or false values (like 72678°C).
On my search i found a Arduino Library for Sensirion Sensors https://forum.arduino.cc/index.php?topic=404335.0. The example sketch works flawlessly with my wiring. i quickly wrote a new module for ESPEasy using the same commands as in the example sketch (it works I2C-independent, non-blocking). Unfortunately i only get Timeout Errors. I tried many combinations of GPIO's, tried using R147 as abse and the new dev10. All the same.
As it's not the ACK-Command that's missing, but only the answer it seems that it basically works and the response will not be heard. I assume that ESPEasy interferes the answer in any way, but i don't understand the big ESPEasy sketch in detail at this point.
Is there anybody on forum that may point me to a way to a solution?
Sensirion SHT20
Moderators: grovkillen, Stuntteam, TD-er
Re: Sensirion SHT20
now i solved the problem: The measure() command has to be called repeatedly until the measurement is ready. In the example loop() is running repeatedly, in ESPEasy PLUGIN_READ is called once a minute.
Just added a small while loop and it works.
Note: If you're using DeepSleep the module has to call sendData after finsihing mesurement, as the regular send is already done at this point (measurement needs too long).
I upload the working module as attachment. It should work with all Sensirion SHT 1X, SHT 2X, SHT 3x Sensors. I tested only SHT 20. You need the Sensirion library from here https://forum.arduino.cc/index.php?topic=404335.0.
It could even replace the SHT1X module ,as this is also I2C-independent and compatible for all series. It has ACK and CRC managment built in.
felix
Just added a small while loop and it works.
Note: If you're using DeepSleep the module has to call sendData after finsihing mesurement, as the regular send is already done at this point (measurement needs too long).
I upload the working module as attachment. It should work with all Sensirion SHT 1X, SHT 2X, SHT 3x Sensors. I tested only SHT 20. You need the Sensirion library from here https://forum.arduino.cc/index.php?topic=404335.0.
It could even replace the SHT1X module ,as this is also I2C-independent and compatible for all series. It has ACK and CRC managment built in.
felix
- Attachments
-
- _P064_SHT.ino.zip
- (1.52 KiB) Downloaded 124 times
Re: Sensirion SHT20
Any news here? Have SHT20 that not working with Si7021 plugin
But wirking on other firmwares.
https://www.aliexpress.com/item/SHT20-D ... 23015.html

https://www.aliexpress.com/item/SHT20-D ... 23015.html
Re: Sensirion SHT20
Anyway, adopted this plugin to latest mega and sht20 works. Thanks
As result I have working sht20 and some fantom reboots, but that's not a big problem.

Re: Sensirion SHT20
Can you please post your adapted, _P064_SHT.ino ?
I got an error while compliling:
Yours Peter
I got an error while compliling:
Code: Select all
no matching function for call to 'addFormSelector(String&, const __FlashStringHelper*, const __FlashStringHelper*, int, const String [3], int [3], int16_t&)'
Who is online
Users browsing this forum: Bing [Bot] and 8 guests