7 Replies Latest reply on Jul 27, 2016 10:45 PM by Radhika.k

    Regarding the hardware of HTS221


      Hai everyone,


                                 I'm very new to this technology. I'm using the Intel edison arduino expansion board,I want to integrate HTS221. I am able to detect the I2C bus but unable to read values. I am using this source code which is mentioned below.In the source code we are using I2C-1 ..can you please let me know the correct pin-out of I2C-1? I refered the below links for the connection of I2C-1 but couldn't find in the hardware.If I'm connecting to A4 and A5 , or in the digital pins SCL and SDA,I can able to detect I2C at the address 0x20.

                                   Can you please let me know the source code modifications which will execute on Intel edison and correct connection.I'm confusing a lot.Please do needful.

      Any or every help is appreciated.

      The links which I referred are

      HTS221/HTS221.c at master · ControlEverythingCommunity/HTS221 · GitHub

      Intel® Edison Breakout Board - Getting Started Tips - Idle Logic Labs

      Arduino - IntelEdison


      Thanks and Regards


        • 1. Re: Regarding the hardware of HTS221
          Intel Corporation
          This message was posted on behalf of Intel Corporation


          If you’re using the Arduino expansion board then I’d suggest you to use I2C6. The I2C1 wiring is not exposed on the Arduino board as can be seen here https://communities.intel.com/message/398630#398630 . In the Arduino expansion board you can see that I2C6 is exposed in GPIO 14 (I2C SDA) and GPIO 165 (I2C SCL)

          You can also check https://communities.intel.com/message/406533#406533 , which discusses a very similar issue as well.


          1 of 1 people found this helpful
          • 2. Re: Regarding the hardware of HTS221

            Hai Everyone,


                                    I'm very thankful for the reply and it is helpful for me.As you have said I have used I2C-6 and compiled the below attached C-program.I have got the output,but the temperature values showing are wrong.In the program given,for the different temperatures,the T0,T1,T2,T3 values are remaining same,though the temp value is changing ,temperature values are wrong after the conversion.The same repeates for humidity also.The formula for the conversion is correct as it is giving the correct values in the arduino board and raspberry pi.Can I know how can I get the correct temperature and humidity values as this completes my project.Thanks in advance.Please do needful.



            • 3. Re: Regarding the hardware of HTS221
              Intel Corporation
              This message was posted on behalf of Intel Corporation

              Does this exact same code work on other boards and provides the correct output? In this case, are you using any IDE or are you compiling and running the code directly from the console? If you change the temperature values and then compile and run the program do you get different values?

              Do you have a logic analyzer? With it you can see the output of the sensor and check it’s actually giving the correct values.


              • 4. Re: Regarding the hardware of HTS221

                Hai Sergio,


                                    Thank you very much for the reply given.I'm using Intel-edison arduino board with yocto image.I'm using I2C-6.I have already mentioned that I have checked with arduino ,raspberry pi ,the sensor is giving the correct values for both temperature and humidity but for Intel-edison board only the T0,T2 and temp values are changing and therefore the temperature values showing are wrong.The same repeates with the humidity values also and incorrect output.


                1. Yes,I'm using the console only to get the output on intel-edison and arduino IDE for arduino.
                2. Yes,I'm getting the different temperature values if the temperature around the sensor is changing but incorrect.
                3. No,I donot have logic analyzer ,but I think the sensor is working correctly as its is giving correct output for arduino and Raspberry.

                I'm not understanding whether it is the code problem or hardware problem.!!!!If it is the code problem,how can I get in arduino?the calibration registers(T0,T2),(H1,H2,H3) values and temp and hum(as per the code) itself are showing wrong and therefore the temperature and humidity values are also showing incorrect.


                I'm pinning the source code,screenshots of the values and arduino values.


                Any and Every help is appreciated.Please do needful.


                • 5. Re: Regarding the hardware of HTS221
                  Intel Corporation
                  This message was posted on behalf of Intel Corporation

                  Hi Radhika.k,

                  Thank you for the detailed description.

                  Based on the information you provided I’d say that the problem is probably the calibration of the sensors and the code. The fact that a sensor works on the first try on a board doesn’t mean it’s going to work the same way on another. Different boards have different hardware that might not adapt to the sensor in the same way as others. In this case, you’d have to treat the Edison and this sensor differently than you have to other boards.

                  I’d suggest you to look at the datasheet of the sensor and make sure that the Edison is being provided with the necessary input from the sensor. An oscilloscope will help you determine if the signal of the sensor is clear for the Edison to interpret. This might also involve making some changes to the code and the formulas used to calculate temperature and humidity.


                  • 6. Re: Regarding the hardware of HTS221
                    Intel Corporation
                    This message was posted on behalf of Intel Corporation

                    Do you still need help with this thread, were you able to make the HTS221 work by calibrating the sensor and adapting the code?


                    • 7. Re: Regarding the hardware of HTS221

                      Thanks a lot..its working :-)