D6T sensor

Discussion in 'The Projects Forum' started by jorgeivan, Sep 7, 2013.

  1. jorgeivan

    Thread Starter New Member

    Sep 25, 2012
    2
    0
    Hi, i have been trying to activate a D6t sensor with an arduino mega but i cant make it work, i have many questions about if what im doing is right, i know that the sensor uses i2c protocol for communication, so im using wire library in arduino, but nothing happens i hope someone of you can help me, i have already try a lot of things, but it seems that nothing works, i leave you everything what i found about the sensor:


    Datasheet:http://www.farnell.com/datasheets/1712551.pdf
    Application note:http://media.digikey.com/pdf/Data Sheets/Omron PDFs/D6T44L_8L_Appl_Note.pdf
    Arduino code:

    Code ( (Unknown Language)):
    1.  
    2. #include <Wire.h>
    3.  
    4. void setup()
    5. {
    6.  Wire.begin ();
    7.  Serial.begin (9600);
    8.  }
    9.  
    10.  void loop ()
    11.  {
    12.  Wire.requestFrom(14,7);
    13.  while(Wire.available ())
    14.  {
    15.    char c=Wire.read();
    16.    Serial.print ("Temperature  ");Serial.println (c);
    17.  }
    18.  delay(500);
    19.  }
    20.  
     
    Last edited by a moderator: Sep 8, 2013
  2. jorgeivan

    Thread Starter New Member

    Sep 25, 2012
    2
    0
Loading...