Announcement

Collapse
No announcement yet.

TMP102 - I2C temperature sensor

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • TMP102 - I2C temperature sensor

    Hello everybody....
    I'm finally finalizing my project and I decided to include a temperature sensor.The one I'm using is the TMP102, but I'm not able to get any useful data from the I2C bus.Any suggestion about how to use the I2C library with this device?
    The device is perfectly working on an Arduino.
    Thanks in advance

  • #2


    Let's see if I can be more precise, so somebody can help me.After the usual addressing of the device in read mode, I can get the first byte (MSB) of the temperature. The problem is that this device send 2 bytes and it seems that the second get lost. The registry (0x00) that contains the temp is a 16bit one, but the I2C_Read() read only the first byte and the second get lost.
    Any idea how to accomplish this very easy task?
    Of course with Arduino is unbelivably easy get what you want from an I2C bus. Is it possible to obtain the same from this platform.
    Thanks in advance for help
    PS: And no. I2C_Gets() doesn't seem to work for me.

    Comment


    • #3


      I finally did it.
      It's working now.
      The funny way this platform (or the compiler) manage the arrays was the cause of the fault.
      In any case I realized that the precision of this sensor is a waste on this platform that supports ONLY integers.
      Very sad.
      I'll post late today a piece of code for ppl who could find it useful.

      Comment


      • #4


        Well it is just a display.

        For more complex functionality it would be usefull to combine it with a MCU.

        I think the I2C functionality in that platform is a waste of time and the developers should take more time on developing additional graphical functions (e.g. stopping video on PICASO, editable fonts, hardware scrolling or a better compiler with code optimization). 

        Comment

        Working...
        X