This Arduino library can be used to interface the SDP3x differential pressure sensor from Sensirion over I2C to get the pressure difference and the temperature reading it exposes.
Installation
Clone the GitHub repository or download a zipped version into the libraries folder of your Arduino IDE.
git clone https://github.com/rac2030/Arduino-Sensirion-SDP3x-driver.git
Usage Example
// To set a different I2C address, uncomment the define
// #define SDP3x_I2C_ADDRESS 0x21
#include "SDP3x.h"
void setup() {
Serial.begin(9600);
Wire.begin();
}
void loop() {
Serial.print("Pressure difference: ");
Serial.println(SDP3x.getPressureDiff());
delay(100);
Serial.print("Temperature: ");
Serial.println(SDP3x.getTemperature());
delay(100);
}