At the beginning, i am not good at english.
Hello.
i want to read thermopile(which is 4-array ir sensor and using I2C) data using arduino uno.
but. i couldn't...
The information of this sensor is right this.
adress : 0x34
Commands : 0xB1(1st Pixcel), B3 (2nd Pixcel), B6 (3rd Pixcel), B8(4th Pixcel)
of course, i put the 10k pull-up registor as parallel at SCL, SCK
even i read pixcel 1, i skecthed code just below.
But. it did not operation.
is there anyone who can solve this problem?
#include <Wire.h>
#define ADDRESS 0x34 // Arduino uses 7 bit addressing so we shift address right one bit
#define Commanad_PIX1 0xB1
#define Commanad_PIX2 0xB3
byte Temparature_pix1_High = 0; // High and low byte of distance
byte Temparature_pix1_Low = 0; // High and low byte of distance
int Temperature_Pix1 = 0;
void setup()
{
// Start comms
Serial.begin(19200);
Serial.print("Temperature Detection ");
Wire.begin(); //i2c connection as master
delay(50); // Delay so everything can power up
// Read the sift bit register from the module, used in calculating range
}
void loop()
{
Wire.beginTransmission(ADDRESS);
Wire.write(Commanad_PIX1);
Wire.endTransmission();
delay(50); // Delay so everything can power up
Wire.requestFrom(ADDRESS, 2);
Wire.endTransmission();
Temparature_pix1_Low = Wire.read();
Temparature_pix1_High = Wire.read();
Temperature_Pix1 = (Temparature_pix1_High * 256 + Temparature_pix1_Low)/10; // Calculate the range in CM
Serial.print("Temperature is ");
Serial.print(Temperature_Pix1);
Serial.println("o C");
delay(50);
}