다음은 RAM에 접근하여 정보를 읽어올 때 쓰이는 주소이다. 해당 주소에 쓰기는 불가능하다. Ta는 Ambient tempature 즉 물체 주변 온도이고, TOBJ1, TOBJ2는 물체의 온도이다.
RAM address 0x07에서 데이터를 읽으면 0.02를 곱한 값이 절대온도가 된다. 절대 온도에서 섭씨 온도를 구하려면 273.15를 빼면 된다.
npm install i2c-bus
const i2cbus= require("i2c-bus");
//0x5a
i2cbus.open(1)
.then(bus => bus.readWord(0x5a, 0x07))
.then(word => console.log(word * 0.02 - 273.15));