Which Arduino board do you use ?
That is a 3.3V chip and the Arduino Uno is a 5V Arduino board.
Can you give a link to the LDC1314 module that you bought ? Or do you use the bare chip ?
The combination of LDC1314 and Arduino is rare. I could only find this: https://hackaday.io/project/19243-ldc1314-breakout.
This is not Arduino code, but it is readable: https://github.com/michael-hao/ldc1314/blob/master/User/ldc1314.c
When you use the "REPLY" button, there is a < / > button on the left above the text field. That is for the code tags. When you put your sketch between < code > and < / code > then it is easier to read for us.
Why do you make "readChannel0()" functions, when all it does is "readValue(LDC,CH0DATA)" ? You might just as well use the "readValue()" functions.
In the datasheet is a warning that the sensor will go nuts with wrong pulses on the I2C bus. Do you have short wires, to avoid noise on the I2c bus ? What value are your pullup resistors ?
Could you add a test, to check the I2C bus every time in ldc_init() ?
void ldc_init()
{
Wire.begin();
Wire.beginTransmission( LDC);
byte error = Wire.endTransmission();
if( error == 0)
{
Serial.println( "LDC1314 sensor found");
}
else
{
Serial.println( "Warning, sensor not found");
}
Configuration();
delay(500);
Caliberate();
}
You could add another test. For example in the loop() read the DEVICE_ID every time the loop() runs and check if that is correct.
It could be a misconfiguration. But first I want to be sure that the I2C communication is running.
Can you take another look at your sketch ? Please don't use the same name for global variables and parameters.
I also prefer names that are longer. For example "lcd1314Address" for the I2C address and perhaps "DATA0register" for the register address of "DATA0".
The datasheet shows a "repeated start" between writing the register address and reading the data. You could add that to your code.
Could you write a function that uses a unsigned 16 bits parameter and writes the MSB and LSB to the sensor ?