codebydant / sht1x_esp32_idf_library

This is a C library for the SHT1X Temperature-Humidity sensor for the esp-idf framework
https://raw.githubusercontent.com/codebydant/sht1x_esp32_idf_library/master/pins-interface/sht15.png
2 stars 0 forks source link

Does this library work? #1

Closed AnthonyAchoy closed 4 years ago

AnthonyAchoy commented 4 years ago

Hi! I've been working with your library and I made a lot of improvements/changes to its logic and it is still not working. I think it is a timing issue but I'm not sure. Does this lib work for someone else?

td43 commented 4 years ago

Hi, why do you think it is not working? do you have some error? I used this library (that is basically the same arduino library but in C) and it worked for me. Could you please post picture of what are you doing?

Daniel

AnthonyAchoy commented 4 years ago

Hi, Daniel Thank you for such a fast response. We are trying to implement sht10 sensor with and ESP32. It was really hard to link cMakes at the beginning, but after resolving that issue we decided to improve your program structure (check them out below). The errors we get are mainly "not able to measure". Also I attach our main program for you to look at. hello_world.tar.gz https://drive.google.com/a/lantern.tech/file/d/1H20Gkl6bViLh4PbCD3ngeDZD4KpLs3Br/view?usp=drive_web

On Thu, Jan 9, 2020 at 3:07 PM Daniel notifications@github.com wrote:

Hi, why do you think it is not working? do you have some error? I used this library (that is basically the same arduino library but in C) and it worked for me. Could you please post picture of what are you doing?

Daniel

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/danielTobon43/sht1x_esp32_idf_library/issues/1?email_source=notifications&email_token=AOEFD22OZP6D6LZM4TNSD2TQ46GXJA5CNFSM4KE36XJKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEIRZBRQ#issuecomment-572756166, or unsubscribe https://github.com/notifications/unsubscribe-auth/AOEFD2ZY4RMVVQMUJDHA7E3Q46GXJANCNFSM4KE36XJA .

AnthonyAchoy commented 4 years ago

Also if you can help us on a call or something it would be greatly appreciated. Just tell which application in case you want it, thanks!

On Thu, Jan 9, 2020 at 4:20 PM Anthony Chaves anthony.chaves@lantern.tech wrote:

Hi, Daniel Thank you for such a fast response. We are trying to implement sht10 sensor with and ESP32. It was really hard to link cMakes at the beginning, but after resolving that issue we decided to improve your program structure (check them out below). The errors we get are mainly "not able to measure". Also I attach our main program for you to look at. hello_world.tar.gz https://drive.google.com/a/lantern.tech/file/d/1H20Gkl6bViLh4PbCD3ngeDZD4KpLs3Br/view?usp=drive_web

On Thu, Jan 9, 2020 at 3:07 PM Daniel notifications@github.com wrote:

Hi, why do you think it is not working? do you have some error? I used this library (that is basically the same arduino library but in C) and it worked for me. Could you please post picture of what are you doing?

Daniel

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/danielTobon43/sht1x_esp32_idf_library/issues/1?email_source=notifications&email_token=AOEFD22OZP6D6LZM4TNSD2TQ46GXJA5CNFSM4KE36XJKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEIRZBRQ#issuecomment-572756166, or unsubscribe https://github.com/notifications/unsubscribe-auth/AOEFD2ZY4RMVVQMUJDHA7E3Q46GXJANCNFSM4KE36XJA .

td43 commented 4 years ago

Hi Anthony, how are you flashing the program to the esp32, are you using esp-idf? and I can't see the CMakeLists.txt file.

td43 commented 4 years ago

What I can see from your program is that you are using a python script to flash the program, right? if that is the case is difficult for me to help you since I made this library (just a translation in C) from the Arduino library to use with the ESP-IDF framework that is the framework for programming the esp32. On the other hand, I use CMake to define the project and then I flash the program with (idf.py). Now, if for you the way that you are defining your project works with another program so I recommend you to printf something in each line, so you can identify where is happening the problem.

td43 commented 4 years ago

I created my own project with your files and is working, although you are using the older library with the humidity fixed but is good. I can't see your error.

Screenshot from 2020-01-10 10-24-49

AnthonyAchoy commented 4 years ago

Hi, Daniel,

We are actually compiling using idf and it is working pretty well. The problem we are having is the same as the one you sent us in that screenshot: "ack not received". Those values that you are receiving are the default ones when nothing is connected. In our case, we are receiving those ones when we have the sensor connected. What can you recommend doing to fix the ack's and the measurement problem?

On Fri, Jan 10, 2020 at 4:26 AM Daniel notifications@github.com wrote:

I created my own project with your files and is working, although you are using the older library with the humidity fixed but is good. I can't see your error.

[image: Screenshot from 2020-01-10 10-24-49] https://user-images.githubusercontent.com/35694200/72146080-a3d3d780-3393-11ea-999f-26b4b13e394b.png

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/danielTobon43/sht1x_esp32_idf_library/issues/1?email_source=notifications&email_token=AOEFD2YN63SARGXJJHPE74TQ5BENDA5CNFSM4KE36XJKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEITPIEQ#issuecomment-572978194, or unsubscribe https://github.com/notifications/unsubscribe-auth/AOEFD22VTXXC2SHAD5VGZ4LQ5BENDANCNFSM4KE36XJA .

td43 commented 4 years ago

well, I noticed that there is a problem with the reading and I will check where is the problem (because the reading is always constant). According to your problem should be a hardware problem or configuration problem with the ACK pin, you should try to change the pin number to another location, maybe the pin number that you choose has an internal configuration for another purpose that is blocking the ACK signal to the sensor.

AnthonyAchoy commented 4 years ago

Thanks!

On Fri, Jan 10, 2020 at 10:42 AM Daniel notifications@github.com wrote:

well, I noticed that there is a problem with the reading and I will check where is the problem (because the reading is always constant). According to your problem should be a hardware problem or configuration problem with the ACK pin, you should try to change the pin number to another location, maybe the pin number that you choose has an internal configuration for another purpose that is blocking the ACK signal to the sensor.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/danielTobon43/sht1x_esp32_idf_library/issues/1?email_source=notifications&email_token=AOEFD22DNJXKPNTOU2GOSUTQ5CQODA5CNFSM4KE36XJKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEIUPYVI#issuecomment-573111381, or unsubscribe https://github.com/notifications/unsubscribe-auth/AOEFD26N6KKVELHFVWOIUO3Q5CQODANCNFSM4KE36XJA .

td43 commented 4 years ago

Hi @AnthonyAchoy, I made changes in the code that fix the problem with the temperature. Please let me know if everything is working well. I used data pin 27 and sck pin 2