smARTMAKERS Hannah: Temperature Logger example code -> "I2C Read Failure"

Anyone who didn’t get this message??

I think we need updated code for the new Hardware?

I don’t know.
All other Hannah samples do work. Maybe it is a hardware failure.
In the hardware specifications I could not find any changes.


sorry my bad!

I didn’t have the time yet to clean up the code and publish it. Promise that tomorrow I will do.

Anyway you must change the ID.

The Rev3 of Hannah has a new temp sensor and the device address is different.

These are the correct settings for the Rev3:

const i2c_ioexp = 0x7C;
const i2c_temp = 0x98;
const i2c_als = 0xE8;
const i2c_accel = 0x38;

The temp sensor and the accelerometer are different from the previous Rev2.

Please note that the whole code probably can’t work, because the protocol for this new sensor is different.

We will need few more days before be able to publish the new working examples. Sorry.

As reference, you can get the datasheet of the new temp sensor here:

TI’s TMP112


I’m looking forward to it! Where should I look for the update?

Thanks for the quick response


sorry, my double bad…

I had a long, long, long day yesterday and last night I was a kind of zombie typing from the studio room with the brain already stick to the pillow in the bed room :slight_smile:

I’ve posted totally wrong information, actually the settings for the Rev2!!!

Here are the correct settings for the Rev3, the one we are shipping now:

const i2c_ioexp = 0x7C;
const i2c_temp = 0x90;
const i2c_als = 0xE8;
const i2c_accel = 0x30;

The correct address for the temp sensor is 30hex.

Again, sorry but I was really tired.


thanks, got some info from Hugo as well.
I’ll better just wait for you to finish the documentation, it’s all new for me


I’ve published a specific discussion under hardware about it.

Anyway try to grab the test code here:


thanks Dimitri, will keep me busy the rest of the day

Test code working fine, I really need the new working code for the temperature sensor with upload to data-service, for the rev3 board.

This an educational project, I promised people to show them this. :frowning:

you can try this one as well

there are examples for xively

Xively’s specific APIs and tutorials are under development. I think it will take a week or two before have the things done, but then will be a perfect match hannah Rev3 + Xively.

Thanks, keep up the good work! I will keep the students busy with soldering this week!

Where can I find some example code for Temp and Accell?
Just checked your product page…

I’ve been using the attached code to read the temperature - which is made from fiddling with various of teh examples until they seemed to work.

That code seems to work, but it seems that the temp-sensor is showing 4 degrees off at 25C and 7-8 degrees of at around 5C. Tried looking through the datasheet, but it should be pretty precise

Tried placing the Hannah board in the fridge with two other temp-sensors. They agreed on 5C and Hannah board temp sensors shows 12-14C.

Anyone got experience?

yeah, I noticed this as well, but didn’t look into it. I believe slibutti has found the right way to do it. Look here:

Looks like you’ll have to calibrate it yourself by adding or subtracting a constant. Give it plenty of time for the entire board to warm/cool. It can’t be expected to immediately measure the temp of the air.

Hmm, took a read at the datasheet. Its more complex than first anticipated. I see that slibutti adjusted the multiplier slightly, which helps a little. But I simply dont find any simple calibration routines that ends up with a constant that we can put into the code?