I2C help for differential pressure sensor

Hey guys,

I’m pretty new to i2c based communication, and I’m trying to read high resolution pressure+temperature data from this differential pressure sensor:

https://www.allsensors.com/datasheets/DS-0350_Rev_A.pdf

I’m a little confused on how to move forward based on the sequence given in the datasheet. This is what I got so far:
(I apologize for any formatting issues, I’m a noobie)

#include <Wire.h>
const int SlaveAddress = 0x29;

void setup() {
  
//Initialize Serial
  Serial.begin(9600);
  
//Initialize Wire
  Wire.begin();
}

void loop() {
  
  //START Condition- "HIGH to LOW transition of SDA line"
  Wire.beginTransmission(SlaveAddress); 
  Wire.write(0); 
  Wire.endTransmission();  
 //Wire.requestFrom(SlaveAddress,1);

}

I'm a little confused on how to move forward based on the sequence given in the datasheet. This is what I got so far:

Cite the page/section/etc. where you decided that sending the device a 0 was a good idea.

The device, each time it is requested to take a measure, sets 7 bytes that can be read. Where are you trying to read the 7 bytes?

The way I read the datasheet, you need to send 3 bytes to the device to complete a command (0xAA, 0x00, and 0x00 to take a single measurement).

The first byte in the answer is a status byte. The next three are the 24 bits of the pressure value. The last three are the 24 bits of the temperature. Use bit shifting (and appropriate casts) to recreate the unsigned longs for temperature and pressure. Page 3 shows how to convert the 24 bit longs to floating point values.

Thanks for the response Paul, I really appreciate the help. I think I understand things a bit more clearly now- but I’m a bit unsure what kind of answer to expect. The code produces the following in the serial window:
961271981281271720
9612719312812719964
96127196192127183128
96127197128127168192

This is the change to the code that I made:

//Include Library
#include <Wire.h>

//Set address
const int SlaveAddress = 0x29;

void setup() {
  // put your setup code here, to run once:
  Serial.begin(9600);
  Wire.begin();
  delay(100);
}

void loop() {
  int val;
  //Write To Chip 
  Wire.beginTransmission(SlaveAddress); 
  Wire.write(0xAA); 
  Wire.write(0x00);
  Wire.write(0x00);
  Wire.endTransmission();  

  //Request 7 Bytes from the device
  Wire.requestFrom(SlaveAddress, 7, true);
  
  //Read 7 bytes from the device.
  while(Wire.available()>0){
  val = Wire.read();
  Serial.print(val);
  }
  Serial.println();
  delay(1000);
}
  //Read 7 bytes from the device.
  while(Wire.available()>0){
  val = Wire.read();
  Serial.print(val);
  }

The comment is wrong. That will read all available data, whether that is 0 bytes, 2 million bytes, or 7 bytes.

Istheresomereasonyoudidn'tprintspacesbetweenthevaluessothatyoucouldunderstandwhereoneendsandthenextbegins?

//Read 7 bytes from the device.
  while(Wire.available()<=7){
  val = Wire.read();
  Serial.print(val);
  Serial.print(" ");
  }
[code]

Oh, i already had a printline and a delay- it just wasnt attached to the code that i posted

//Include Library
#include <Wire.h>

//Set address
const int SlaveAddress = 0x29;

void setup() {
  // put your setup code here, to run once:
  Serial.begin(9600);
  Wire.begin();
  delay(100);
}

void loop() {
  int val;
  //Write To Chip 
  Wire.beginTransmission(SlaveAddress); 
  Wire.write(0xAA); 
  Wire.write(0x00);
  Wire.write(0x00);
  Wire.endTransmission();  

  //Request 7 Bytes from the device
  Wire.requestFrom(SlaveAddress, 7, true);
  
  //Read 7 bytes from the device.
  while(Wire.available()<=7){
  val = Wire.read();
  Serial.print(val);
  }
  Serial.println();
  delay(1000);
}

Posting the same code again, with no additional commentary, is a waste of time.

Alright, Thank you for your help.