This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

How to use SHT1x sensor?

I just figured it out it is not I2C protocol. I need to write all the command by Bit-Bang mode. How can I send/receive data with manual bit command to SHT1x sensor? Can anybody share any library for SHT1x sensor or Bit-Bang mode?? I am using nrf51822 with SDK11 (S130). THank you!

Parents
  • Hi,

    I've had to bit-bang an SHT75 and SHT1x interface on several processors including the nRF5x chips. Unfortunately that code belongs to my employer and I cannot share it. That said, it is a simple matter of controlling a couple of GPIO pins to do the work. The folks at Sensirion do provide example code for you though. Take a look here:

    SHT example code

    Good luck!

    John

  • I don't see anything obvious. Have you tried to watch the clock and data lines with a scope during the transaction? That's usually the most useful debugging technique with these types of things.

    Also, because you are using the nrf_gpio API to control the pins, you likely do not need those __NOP(); calls. There is probably plenty of delay caused by the API calls to meet the timing spec of the SHT part. I'd get those out of there to improve your readability if nothing else.

Reply
  • I don't see anything obvious. Have you tried to watch the clock and data lines with a scope during the transaction? That's usually the most useful debugging technique with these types of things.

    Also, because you are using the nrf_gpio API to control the pins, you likely do not need those __NOP(); calls. There is probably plenty of delay caused by the API calls to meet the timing spec of the SHT part. I'd get those out of there to improve your readability if nothing else.

Children
No Data
Related