Go to the documentation of this file.
44 hwi->__delay_blocking_ms(100);
47 for (
int i = 0; i < 6; i++) {
48 wbuffer[0] = 0xA0 + ((i + 1) << 1);
50 if (!bres)
return false;
51 sensorCT.
C[i] = (rbuffer[0] << 8) + rbuffer[1];
112 int32_t pressure_raw;
113 int32_t temperature_raw;
119 if (!bres)
return false;
124 if (!bres)
return false;
126 hwi->__delay_blocking_ms(2);
129 if (!bres)
return false;
131 pressure_raw = (rbuffer[0] << 16) + (rbuffer[1] << 8) + rbuffer[2];
136 if (!bres)
return false;
141 if (!bres)
return false;
143 hwi->__delay_blocking_ms(2);
146 if (!bres)
return false;
148 temperature_raw = (rbuffer[0] << 16) + (rbuffer[1] << 8) + rbuffer[2];
185 if (!bres)
return false;
193 if (!bres)
return false;
216 int32_t pressure_raw;
217 int32_t temperature_raw;
234 if (!bres)
return false;
235 hwi->__delay_blocking_ms(2);
237 if (!bres)
return false;
243 temperature_raw = (rbuffer[0] << 16) + (rbuffer[1] << 8) + rbuffer[2];
249 pressure_raw = (rbuffer[0] << 16) + (rbuffer[1] << 8) + rbuffer[2];
277 float PINSIDE, PINSIDE_ZERO;
299 dT = raw_temp - (C5 * pow(2, Q5));
300 Temp = 2000 + ((dT * C6) / pow(2, Q6));
301 OFF = (C2 * pow(2, Q2)) + ((C4 * dT) / (pow(2, Q4)));
302 SENS = (C1 * pow(2, Q1)) + ((C3 * dT) / (pow(2, Q3)));
303 Pres = (((raw_pressure * SENS) / (pow(2, 21))) - OFF) / (pow(2, 15));
305 *T = ((float)Temp) / 100.0;
306 PINSIDE = ((float)Pres) / 10000.0 * 68.9476;
398 if (!bres)
return false;
430 for (
int i = 0; i < 50; i++)
t_ps_resolution sensor_resolution
bool doMeasure(float *P, float *T)
Perform a full measure in blocking mode.
bool I2CRead(t_i2cdevices device, uint8_t *wbuffer, int wlength, uint8_t *rbuffer, int rlength, bool stop)
Write buffer to I2C bus and read data.
bool Init(t_i2cdevices device, t_ps_sensor model, t_ps_resolution ps_resolution, void *hw_handle)
Init pressure sensor TE 5525DSO.
void correctZero(float value)
Incremental 0 correction for Venturi cycle to cycle adjust.
float doZero()
Calculate sensor zero.
void CalibrateDate_5525DSO(int32_t raw_temp, int32_t raw_pressure, float *T, float *P)
Convert row measure in P/V.
bool I2CWrite(t_i2cdevices device, uint8_t *wbuffer, int wlength, bool stop)
Write buffer to I2C bus.
bool Reset_5525DSO()
Reset the sensor.
uint32_t GetResolutionDelay()
Obtain the conversion time for specified resolution.
float GetConversionDelay()
Return correction delay.
bool asyncMeasure()
Start an asynchronous measure process (NON BLOKING)
Driver for the Nuclear Instruments V4 Hardware Board.
void DbgPrint(dbg_source source, verbose_level vl, String s)
Print a message on the debug console.
Debug class: this class print debug message.
uint8_t GetResolutionByteCodePressure()
Obtain the conversion code for P for specified resolution.
bool asyncGetResult(float *P, float *T)
Get result from an NON BLOCKING measure process.
void setZero(float value)
Calibrate sensor zero with a specified value.
t_5525DSO_calibration_table sensorCT
uint8_t GetResolutionByteCodeTemp()
Obtain the conversion code for T for specified resolution.