Micro-Barometer using DPS310 with ESP32LCD Board.    09th June 2024 Yoshio Okamoto

Making a precise barometer employing a Digital Barometric Air Pressure Sensor <DPS310>
with EPS32-3.5"LCD Board running by ArduinoIDE

Previous version:
Digital Barometric Air Pressure Sensor <DPS310> with Arduino Uno + Raspberry Pi
http://www.yossi-okamoto.net/2022_Matsue/GeoSciEd9_Barometer_Poster_E_v1.pdf

I would like to thank to Mr.Masayuki Tanaka who is the owner of https://lang-ship.com/blog/

He gave us an important suggestion about how to get screenshots of this LCD. 

Full view



ESP32board with 3.5”LCD
Net Shop: https://ja.aliexpress.com/item/1005005542773413.html
Board Reference site:https://macsbug.wordpress.com/2022/10/02/esp32-3248s035/

Micro-Barometric sensor DPS310]
Maker:https://www.infineon.com/cms/jp/product/sensor/pressure-sensors/pressure-sensors-for-iot/dps310/
Shop:https://www.switch-science.com/products/6286

1.Hardware
Board graphics


<Important Tips>
To capture and save the LCD screen, the above R24 should be soldered!!
(
The author is not responsible for any disadvantages caused by using this soldering!)
http://www.yossi-okamoto.net/Microbarometer/ESP32-3248S035_Capture.html (Japanese only)

Connecting R24 for LCD screenshot(under right)

 
R24 Open                                               R24 Close


Board and Sensor Connection



2.Software

Software: Arduino IDE + libraries
ESP32 and DPS310 libraries



Some essence for ArduinoIDE driving software

void setup() {
 
  Serial.begin(9600);   // at first!
  wifi_start();            // wifi

  // Initialize SD card.      forget this! 2023-01-24
    if (!SD.begin()) { 
        lcd.println(
            "Card failed, or not present");  // Print a message if the SD card
        while (1);
    }
 
  lcd.init();
  // 回転方向を 0~3 の4方向から設定します。(4~7を使用すると上下反転になります。)
  lcd.setRotation(3);

  Serial.begin(115200);

  lcd.setColorDepth(16);
  lcd.startWrite();
  lcd.setAddrWindow(0, 0, lcd.width(), lcd.height());
 
  while (!Serial);      // confirmatiion
  Dps310PressureSensor.begin(Wire);     // connect to DPS310 via i2c
  Serial.println("Init complete!");     // serial port completed
  //WiFi.mode(WIFI_OFF);         // 2022-08-15 https://www.mgo-tec.com/blog-entry-m5stack-yahoo-weather-news-scrolle-watch-message.html 

}

The complete code is here. (This is just a prototype.
The author is not responsible for any disadvantages caused by using this program!)

EPS32-DPS310_1Hz_pub.ino
ESP32-3248S035r.h
lgfx_ESP32_3248S035.h

Two header files are created by 
https://macsbug.wordpress.com/2022/10/02/esp32-3248s035/
https://lang-ship.com/blog/work/esp32-3248s035/


I am strongly appreciated the above header code creator.


びCopyright(c) by Y.Okamoto 2024, All rights reserved..