Reading temperature data on a Chronodot?

For other supported Arduino products from Adafruit: Shields, accessories, etc.

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
Locked
User avatar
sjn3
 
Posts: 15
Joined: Fri Nov 19, 2010 12:36 pm

Reading temperature data on a Chronodot?

Post by sjn3 »

Has anyone tried reading the temperature data registers in a Chronodot? I'm getting good time and date data off the chip using the appropriate register offset & quantity with this code so I believe I _am_ addressing registers 11h & 12h; but tempMSB is always 2h and tempLSB is always 12h even while heating or cooling the chip (which automatically updates the registers every 64 seconds).

Any ideas/comments? Thanks.

My code:
Wire.beginTransmission(0x68); // 0x68 is DS3231 device address
Wire.write((byte)11); // start at register 11h
Wire.endTransmission();
Wire.requestFrom(0x68, 2); // read 11h & 12h
while(Wire.available()) {
tempMSB = Wire.read(); //get signed integer: MSB=sign, 7 LSB = integer
tempLSB = Wire.read(); //get binary decimal: 2 MSB = data, 6 LSB = 0
}

User avatar
macegr
 
Posts: 293
Joined: Fri Apr 04, 2008 4:46 pm

Re: Reading temperature data on a Chronodot?

Post by macegr »

11 is not the same as 11h :)

Locked
Please be positive and constructive with your questions and comments.

Return to “Other Arduino products from Adafruit”