Project #28 – Sensors – Barometer – Mk25

Project #28 – Sensors –  Barometer – Mk25

 

Web

 

https://www.donluc.com/?p=4674

 

Facebook

 

https://www.facebook.com/share/v/1JvPXHziiD/

 

YouTube

 

https://youtu.be/CldKeLwZ95Q


#DonLucElectronics #DonLuc #Barometer #SparkFunESP32WROOM  #ESP32 #Display #IoT #Project #Fritzing #Programming #Electronics #Microcontrollers #Consultant

Crowtail - BMP180 Barometer

 

The BMP180 offers a pressure measuring range of 300 to 1100 hPa with an accuracy down to 0.02 hPa in advanced resolution mode. It’s based on piezo-resistive technology for high accuracy, ruggedness and long term stability. These come factory-calibrated, with the calibration coefficients already stored in ROM.

 

DL2601Mk03

 

1 x SparkFun Thing Plus - ESP32 WROOM
1 x Adafruit SHARP Memory Display
1 x Crowtail - BMP180 Barometer
1 x Terminal Block Breakout FeatherWing
1 x Lithium Ion Battery - 1000mAh
1 x Micro USB Cable

 

DL2601Mk03p

 

DL2601Mk03p.ino

CODE
/****** Don Luc Electronics © ******
Software Version Information
Project #28 – Sensors – Barometer – Mk25
28-25
DL2601Mk03p.ino
DL2601Mk03
1 x SparkFun Thing Plus - ESP32 WROOM
1 x Adafruit SHARP Memory Display
1 x Crowtail - BMP180 Barometer
1 x Terminal Block Breakout FeatherWing
1 x Lithium Ion Battery - 1000mAh
1 x Micro USB Cable
*/

// Include the Library Code
// EEPROM Library to Read and Write EEPROM with Unique ID for Unit
#include "EEPROM.h"
// Wire
#include <Wire.h>
// SHARP Memory Display
#include <Adafruit_SharpMem.h>
#include <Adafruit_GFX.h>
// BMP180 Barometer
#include <SFE_BMP180.h>

// BMP180 Barometer
SFE_BMP180 pressure;
// Altitude 8.23
#define ALTITUDE 8.23
// Status
char status;
// Temperature
double dTemp;
String sT;
// Pressure
double dPre;
String sP;
// Sea Level ALTITUDE
double dP0;
String sP0;
// ALTITUDE
double dAlt;
String sA;

// SHARP Memory Display
#define SHARP_SCK  13
#define SHARP_MOSI 12
#define SHARP_SS   27
// Set the size of the display here, e.g. 144x168!
Adafruit_SharpMem display(SHARP_SCK, SHARP_MOSI, SHARP_SS, 144, 168);
// The currently-available SHARP Memory Display (144x168 pixels)
// requires > 4K of microcontroller RAM; it WILL NOT WORK on Arduino Uno
// or other <4K "classic" devices.
#define BLACK 0
#define WHITE 1

// Software Version Information
// EEPROM Unique ID Information
#define EEPROM_SIZE 64
String uid = "";

// Software Version Information
String sver = "28-25";

void loop() {
  
  // Barometer Sensor
  isBarometer();

  // isDisplay Barometer
  isDisplayBarometer();

  // Delay 1 Second
  delay( 1000 );

}

getBarometer.ino

CODE
// Barometer Sensor
// is Barometer
void isBarometer(){

  // Temperature 
  status = pressure.getTemperature( dTemp );

  
     if (status != 0) {
  
       status = pressure.getPressure( dPre, dTemp );
       
       if (status != 0) {

         // Temperature 
         sT = dTemp;
      
         // Pressure
         sP = dPre;

         // Sea Level ALTITUDE
         sP0 = pressure.sealevel( dPre, ALTITUDE );

         sA = ALTITUDE;

       }

     }

}

getDisplay.ino

CODE
// SHARP Memory Display
// SHARP Memory Display - UID
void isDisplayUID() {

    // Text Display 
    // Clear Display
    display.clearDisplay();
    display.setRotation(4);
    display.setTextSize(3);
    display.setTextColor(BLACK);
    // Don Luc Electronics
    display.setCursor(0,10);
    display.println( "Don Luc" );
    display.setTextSize(2);
    display.setCursor(0,40);
    display.println( "Electronics" );
    // Version
    //display.setTextSize(3);
    display.setCursor(0,70);
    display.println( "Version" );
    //display.setTextSize(2);
    display.setCursor(0,95);   
    display.println( sver );
    // EEPROM
    display.setCursor(0,120);
    display.println( "EEPROM" );
    display.setCursor(0,140);   
    display.println( uid );
    // Refresh
    display.refresh();
    delay( 100 );
    
}
// Display Barometer
void isDisplayBarometer() {

    // Text Display Barometer
    // Clear Display
    display.clearDisplay();
    display.setRotation(4);
    display.setTextSize(2);
    display.setTextColor(BLACK);
    // Barometer Sensor
    display.setCursor(0,5);
    display.println( "Barometer" );
    display.setCursor(0,35);
    // Temperature 
    display.print( "Temp: " );
    display.setCursor(60,35);
    display.print( sT );
    display.setCursor(120,35);
    display.println( "C" );
    // Pressure
    display.setCursor(0,65);
    display.print( "Baro: " );
    display.setCursor(60,65);
    display.println( sP );
    // Sea Level ALTITUDE
    display.setCursor(0,95);
    display.print( "BaSe: " );
    display.setCursor(60,95);
    display.println( sP0 );
    // ALTITUDE
    display.setCursor(0,125);
    display.print( "Alt: " );
    display.setCursor(60,125);
    display.print( sA );
    display.setCursor(120,125);
    display.println( "M" );
    // Refresh
    display.refresh();
    delay( 100 );

}

getEEPROM.ino

CODE
// isUID EEPROM Unique ID
void isUID()
{
  
  // Is Unit ID
  uid = "";
  for (int x = 0; x < 7; x++)
  {
    uid = uid + char(EEPROM.read(x));
  }
  
}

setup.ino

CODE
// Setup
void setup()
{
 
  // Delay
  delay( 100 );

   // EEPROM Size
  EEPROM.begin(EEPROM_SIZE);
  
  // EEPROM Unique ID
  isUID();

  // Delay
  delay( 100 );

  // SHARP Display Start & Clear the Display
  display.begin();
  // Clear Display
  display.clearDisplay();

  // Delay
  delay( 100 );
  
  // Initialize the sensor (it is important to get calibration values
  // stored on the device).
  pressure.begin();

  // Delay
  delay( 2000 );

  // Temperature
  pressure.startTemperature();

  // Pressure
  pressure.startPressure(3);

  // Delay
  delay( 100 );

  // Display UID
  // Don Luc
  // Electronic
  // Version
  // EEPROM
  isDisplayUID();

  // Delay 5 Second
  delay( 5000 );

}

People can contact us: http://www.donluc.com/?page_id=1927

 

Consultant, R&D, Electronics, IoT, Teacher and Instructor

 

-Programming Language
-Microcontrollers (PIC, Arduino, Raspberry Pi, Arm, Silicon Labs, Espressif, Etc...)
-IoT
-Wireless (Radio Frequency, Bluetooth, WiFi, Etc...)
-Robotics
-Automation
-Camera and Video Capture Receiver Stationary, Wheel/Tank , Underwater and UAV Vehicle
-Unmanned Vehicles Terrestrial, Marine and UAV
-Machine Learning
-Artificial Intelligence (AI)
-RTOS
-Sensors, eHealth Sensors, Biosensor, and Biometric
-Research & Development (R & D)
-Consulting
-Etc...

 

Follow Us

 

Luc Paquin – Curriculum Vitae - 2026
https://www.donluc.com/luc/LucPaquinCVEng2026Mk01.pdf
https://www.donluc.com/luc/

 

Web: https://www.donluc.com/
Web: https://www.jlpconsultants.com/
Facebook: https://www.facebook.com/neosteam.labs.9/
YouTube: https://www.youtube.com/@thesass2063
DFRobot: https://learn.dfrobot.com/user-10186.html
Elecrow: https://www.elecrow.com/share/sharepj/center/no/760816d385ebb1edc0732fd873bfbf13
TikTok: https://www.tiktok.com/@luc.paquin
Hackster: https://www.hackster.io/luc-paquin
LinkedIn: https://www.linkedin.com/in/jlucpaquin/

 

Don Luc

icon DL2601Mk03.zip 239KB Download(0)
License
All Rights
Reserved
licensBg
0