https://github.com/lukagith/xgzp6867d
Arduino code to read XGZP6867D and XGZP6847D sensor
https://github.com/lukagith/xgzp6867d
arduino code xgzp6847d xgzp6867d
Last synced: 2 months ago
JSON representation
Arduino code to read XGZP6867D and XGZP6847D sensor
- Host: GitHub
- URL: https://github.com/lukagith/xgzp6867d
- Owner: LukaGitH
- Created: 2025-03-18T19:20:57.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2025-03-18T19:40:21.000Z (over 1 year ago)
- Last Synced: 2025-03-28T11:18:46.141Z (about 1 year ago)
- Topics: arduino, code, xgzp6847d, xgzp6867d
- Language: C++
- Homepage:
- Size: 189 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# XGZP6867D Pressure Sensor - Arduino Example
This repository provides an **Arduino sketch** to interface with the **XGZP6867D**, **XGZP6847D** pressure sensor using the **I²C protocol**. It correctly reads **pressure (kPa)** and **temperature (°C)**, supporting both **positive and negative pressures**.
## 📊 Pressure Range Table
Below is the **pressure range (kPa) vs K value** table from the sensor datasheet:

> **Note:** The `K` value is selected according to the **absolute pressure range**. Adjust it in the code accordingly.
## 📡 Wiring Guide
| **Sensor Pin** | **Arduino (5V Logic)** | **ESP32 (3.3V Logic)** | **PIN on Sensor Module** |
|---------------|----------------|----------------|----------------|
| **VDD (Power)** | `5V` | `3.3V` | **Pin 4** |
| **GND** | `GND` | `GND` | **Pin 3** |
| **SDA (Data)** | `A4 (SDA)` | `GPIO21 (SDA)` | **Pin 5** |
| **SCL (Clock)** | `A5 (SCL)` | `GPIO22 (SCL)` | **Pin 1** |
> 🛠 **Ensure pull-up resistors (4.7kΩ - 10kΩ) are used on SDA & SCL if not present on the module or Arduino board.**