How to configure 3 SHT21 sensor

migbur
Posts: 12
Joined: Mon Mar 12, 2018 1:57 pm

How to configure 3 SHT21 sensor

Postby migbur » Thu Apr 12, 2018 10:12 am

Hi all

I want to configure 3 SHT21 sensors, the problem is that each, has same address.
Whit DFRobot_SHT20 library works fine, but all lib are designed for just on two ESP32 pins.
I can duplicate the library 3 times, but should be a better opcion, do you can help me.

now whit one sensor

Time:961621 Temperature:32.2C Humidity:21.2%
Time:962721 Temperature:32.2C Humidity:21.2%
Time:963821 Temperature:32.2C Humidity:21.2%
Time:964921 Temperature:32.2C Humidity:21.2%
Time:966021 Temperature:32.2C Humidity:21.2%

I modify ths lib to manually insert ths wire pin

void DFRobot_SHT20::initSHT20(TwoWire &wirePort)
{
i2cPort = &wirePort;
//i2cPort->begin(D4,D5);
i2cPort->begin(27,25);
}
Plesase I need help.

migbur
Posts: 12
Joined: Mon Mar 12, 2018 1:57 pm

Re: How to configure 3 SHT21 sensor

Postby migbur » Fri May 25, 2018 10:23 am

Hi, the solution is simple add a I2C extender chip

Problem solved

Who is online

Users browsing this forum: Majestic-12 [Bot] and 106 guests