Page 1 of 2

SHT21

Posted: Sun Aug 13, 2023 4:24 pm
by jgu1
Hi!

I have opened an SHT21 project created in FC9, now it is not working, made a test in FC 10 too also not working, pls, what am I doing wrong?

Br Jorgen

Re: SHT21

Posted: Sun Aug 13, 2023 9:18 pm
by medelec35
Hi Jorgen.
I have just ordered an SHT21, so I can see if I can get it to work.

Re: SHT21

Posted: Sun Aug 13, 2023 9:31 pm
by mnfisher
Looks like it is an i2c issue - having a display and the sensor on i2c but both using the same channel.

The sensor uses Transaction_Write in Get_Data - but never initialises the i2c to use the correct address. The sensor doesn't seem top have an initialise routine (to init the i2c channel) at all?

Martin

Re: SHT21

Posted: Mon Aug 14, 2023 6:25 am
by jgu1
Hi Martin & Martin!

Thank you both. I'm glad you can also see that something is not working. And mnfisher for the test and troubleshooting :D

@medelec35:

I can send you a SHT21?

If you find an error in the communication and you correct it, it will hopefully not affect other components with the same communication, I see in the past there have been lot of update with the I2C com, and especially not the ILI9488, ILI9341 and st7796 display, I know they use SPI, but anyway, I still work in a project with these display ;)

Br Jorgen

Re: SHT21

Posted: Mon Aug 14, 2023 2:46 pm
by BenR
Hello,

It looks like the initialise function for the SHT21 component was missing from the component export. I've now included it in v10 and so it should be there now if you get the latest library updates.

Hopefully this will solve the issue for you.

Re: SHT21

Posted: Mon Aug 14, 2023 3:13 pm
by jgu1
Hi Ben!

I have just perform a test after update, sorry still not working, Temp -46 and Hum -6

Try to change from SW mode and back again and another device, no luck.

Jorgen

Re: SHT21

Posted: Mon Aug 14, 2023 3:49 pm
by BenR
Hi Jorgen,

In your program have you added a call to the SHT21 initialise function?

Re: SHT21

Posted: Mon Aug 14, 2023 4:02 pm
by medelec35
I can confirm that after adding initialise, on hardware, the temperature and humidity functions are working as expected.

Re: SHT21

Posted: Mon Aug 14, 2023 6:39 pm
by jgu1
Hi both, so sorry forgot the initialisering, when I come Home, I test and you hear. So many thank’s :D

Br Jorgen

Re: SHT21

Posted: Mon Aug 14, 2023 7:39 pm
by jgu1
Hi again!

Thank you, stupid me, of course I need to add the initialise, work perfeckt now :) will it also be added in FC9 too ;)

Br Jorgen