sensor-experiments

Introduction

This experiment demonstrates how to use the HP03S sensor to measure air pressure with Arduino.

Components Needed

No Ads Available.

Circuit Setup

  1. Connect the HP03S sensor to the Arduino using I2C pins (SDA, SCL, VCC, GND).

The HP03S sensor uses I2C communication to send air pressure data to the Arduino.

Code for Air Pressure Measurement

Upload the following code to your Arduino to read the air pressure:


#include 
#include 

HP03S sensor;

void setup() {
  Serial.begin(9600);
  sensor.begin();
}

void loop() {
  float pressure = sensor.readPressure();
  Serial.print("Air Pressure: ");
  Serial.print(pressure);
  Serial.println(" hPa");
  delay(1000);
}
            

Explanation

The HP03S sensor measures the atmospheric pressure and sends the data to the Arduino via I2C, which then outputs it in hPa (hectopascals).

Troubleshooting

Contact Us

If you have any questions or inquiries, feel free to reach out to us at Microautomation.no@icloud.com .

Follow our Socials for the newest updates!