Project #15: Environment – C4002 mmWave Human Presence Sensor – Mk47

——

#DonLucElectronics #DonLuc #C4002 #Environment #FireBeetle2ESP32E #ESP32 #Display #IoT #Project #Fritzing #Programming #Electronics #Microcontrollers #Consultant

——
C4002 mmWave Human Presence Sensor

——

C4002 mmWave Human Presence Sensor

——

C4002 mmWave Human Presence Sensor

——

Fermion: C4002 mmWave Human Presence Sensor

Traditional PIR sensors only see movement. The C4002 sees people, whether walking, sitting, sleeping, or working. Beyond Traditional PIR Limits, delivers “True Presence” Automation with Micro-Motion Detection. Traditional PIR sensors often fail to detect stationary occupants, leading to inconvenient lighting deactivation. The Fermion: C4002 mmWave radar module resolves this by utilizing 24GHz FMCW technology to detect micro-motions (such as breathing and chest expansion). Capable of distinguishing between moving, stationary, and micro-moving targets within a 10×10 meter range, this module serves as a reliable core component for smart lighting, HVAC control, and security monitoring in Home Assistant and IoT systems.

DL2608Mk04

1 x DFRobot FireBeetle 2 ESP32-E
1 x Fermion: 3.5” 480×320 TFT LCD Capacitive
1 x GDL Line 10 CM
1 x Fermion: C4002 mmWave Human Presence Sensor
1 x Gravity: IO Shield for FireBeetle 2
1 x Terminal Block Board for FireBeetle 2 ESP32-E IoT
1 x Lithium Ion Battery – 1000mAh
1 x USB 3.0 to Type-C Cable

DL2608Mk04p

DL2608Mk04p.ino

/****** Don Luc Electronics © ******
Software Version Information
Project #15: Environment – C4002 mmWave Human Presence Sensor – Mk47
15-47
DL2608Mk04p.ino
DL2608Mk04
1 x DFRobot FireBeetle 2 ESP32-E
1 x Fermion: 3.5” 480x320 TFT LCD Capacitive
1 x GDL Line 10 CM
1 x Fermion: C4002 mmWave Human Presence Sensor
1 x Gravity: IO Shield for FireBeetle 2
1 x Terminal Block Board for FireBeetle 2 ESP32-E IoT
1 x Lithium Ion Battery - 1000mAh
1 x USB 3.0 to Type-C Cable
*/

// Include the Library Code
// DFRobot Display GDL API
#include <DFRobot_GDL.h>
// C4002 mmWave Human Presence
#include "DFRobot_C4002.h"

// C4002 mmWave Human Presence
DFRobot_C4002 c4002(&Serial1, 115200, /*D0*/ D11, /*D1*/ D10);
//float light;
String sLight;
// Get Target State
String sTarget;
// Get Presence distance gate target info
String sPreDis;
// Get motion distance gate index
String sMot;

// Defined ESP32
#define TFT_DC  D2
#define TFT_CS  D6
#define TFT_RST D3

/*dc=*/ /*cs=*/ /*rst=*/
// DFRobot Display 320x480
DFRobot_ILI9488_320x480_HW_SPI screen(TFT_DC, TFT_CS, TFT_RST);

// Software Version Information
String sver = "15-47";

void loop() {
  
  // isC4002
  isC4002();
  
  // isDisplay C4002
  isDisplayC4002();

  // Delay 0.1 Second
  delay( 100 );
  
}

getC4002.ino

// C4002 mmWave Human Presence
// isSetupC4002
void isSetupC4002(){

  // C4002 mmWave Human Presence
  // Initialize the C4002 sensor
  while (c4002.begin() != true) {
    Serial.println("C4002 begin failed!");
    delay(1000);
  }
  //Serial.println("C4002 begin success!");
  delay(50);

  // Set the run led to On

  if (c4002.setRunLedState(eLedOn)) {
    //Serial.println("Set run led success!");
  } else {
    Serial.println("Set run led failed!");
  }
  delay(50);

  // Set the out led to On
  if (c4002.setOutLedState(eLedOn)) {
    //Serial.println("Set out led success!");
  } else {
    Serial.println("Set out led failed!");
  }
  delay(50);

  // Set the Resolution mode to 20cm.
  // eResolution20Cm: This indicates that the resolution of the "distance gate"
  // is 20cm. With a resolution of 20 cm, it supports up to 25 distance gates, 
  //with a maximum distance of 4.9 meters
  //c4002.setResolutionMode(eResolution20Cm);
  if (c4002.setResolutionMode(eResolution20Cm)) {
    //Serial.println("Set resolution mode success!");
  } else {
    Serial.println("Set resolution mode failed!");
  }
  delay(50);

  // Set the detect range to 0-200 cm
  uint16_t clostRange = 0;
  uint16_t farRange   = 200;
  if (c4002.setDetectRange(clostRange, farRange)) {    // Max detect range(0-1100cm)
    //Serial.println("Set detect range success!");
  } else {
    Serial.println("Set detect range failed!");
  }

  // Set the light threshold to 0 lux.range: 0-50 lux
  if (c4002.setLightThresh(0)) {
    //Serial.println("Set light threshold success!");
  } else {
    Serial.println("Set light threshold failed!");
  }
  delay(50);

  // Resolution mode:eResolution20Cm
  // Enable the 'distance gate'
  // Resolution mode:eResolution20Cm,This means that the number of 'distance gates' 
  // we can operate is 25
  //disable : C4002_DISABLE, enable: C4002_ENABLE
  uint8_t gateState[25] = { C4002_ENABLE, C4002_ENABLE, C4002_ENABLE, C4002_ENABLE, 
  C4002_ENABLE, C4002_ENABLE, C4002_ENABLE, C4002_ENABLE, C4002_ENABLE,
   C4002_ENABLE, C4002_ENABLE, C4002_ENABLE, C4002_ENABLE, C4002_ENABLE, 
   C4002_ENABLE, C4002_ENABLE, C4002_ENABLE, C4002_ENABLE, C4002_ENABLE, C4002_ENABLE,
   C4002_ENABLE, C4002_ENABLE, C4002_ENABLE, C4002_ENABLE, C4002_ENABLE };

  // Operation motion distance gate
  if (c4002.configureGate(eMotionDistGate, gateState)) { 
    Serial.println("Enable motion distance gate success!");
  }

  // Delay
  delay(50);

  // Operation presence distance gate
  if (c4002.configureGate(ePresenceDistGate, gateState)) { 
    Serial.println("Enable presence distance gate success!");
  }
  
  // Delay
  delay(50);

  // Set the target disappear delay time to 1s,range: 0-65535s
  if (c4002.setTargetDisappearDelay(1)) {
    //Serial.println("Set target disappear delay time success!");
  } else {
    Serial.println("Set target disappear delay time failed!");
  }
 
  // Delay
  delay(50);

  // Set the report period to 10 * 0.1s = 1s
  if (c4002.setReportPeriod(10)) {
    //Serial.println("Set report period success!");
  } else {
    Serial.println("Set report period failed!");
  }

}
// isC4002
void isC4002(){

  // Get all the results of the C4002 sensor
  sRetResult_t retResult = c4002.getNoteInfo();

  if (retResult.noteType == eResult) {
    //Serial.println("------- Get all results --------");
    // get the light intensity
    float light = c4002.getLightIntensity();
    //Serial.print("Light: ");
    //Serial.print(light);
    //Serial.println(" lux");
    sLight = light;

    // get Target state
    eTargetState_t targetState = c4002.getTargetState();
    //Serial.print("Target state: ");
    if (targetState == eNoTarget) {

      //Serial.println("No Target");
      sTarget = "No Target";

    } else if (targetState == ePresence) {
      
      //Serial.println("Static Presence");
      sTarget = "Static Presence";

    } else if (targetState == eMotion) {
      
      //Serial.println("Motion");
      sTarget = "Motion";

    }

    // Get Presence distance gate target info
    sPresenceTarget_t presenceTarget = c4002.getPresenceTargetInfo();
    //Serial.print("Presence distance: ");
    //Serial.print(presenceTarget.distance);
    sPreDis = presenceTarget.distance;
    //Serial.println(" m");

    // Get motion distance gate index
    sMotionTarget_t motionTarget = c4002.getMotionTargetInfo();

    //Serial.print("Motion direction: ");
    if (motionTarget.direction == eAway) {
      
      //Serial.println("Away!");
      sMot = "Away!";

    } else if (motionTarget.direction == eNoDirection) {
      
      //Serial.println("No Direction!");
      sMot = "No Direction!";

    } else if (motionTarget.direction == eApproaching) {
      
      //Serial.println("Approaching!");
      sMot = "Approaching!";

    }
  }

}

getDisplay.ino

// DFRobot Display 320x480
// DFRobot Display 320x480 - UID
void isDisplayUID(){

  // DFRobot Display 240x320
  // Text Display
  // Text Wrap
  screen.setTextWrap(false);
  // Rotation
  screen.setRotation(3);
  // Fill Screen => black
  screen.fillScreen(0x0000);
  // Text Color => white
  screen.setTextColor(0xffff);
    // Font => Free Sans Bold 12pt
  screen.setFont(&FreeSansBold12pt7b);
  // TextSize => 1.5
  screen.setTextSize(1.5);
  // Don Luc Electronics
  screen.setCursor(0, 30);
  screen.println("Don Luc Electronics");
  // BME280 Environmental
  screen.setCursor(0, 60);
  screen.println("C4002 Human Presence");
  // Version
  screen.setCursor(0, 90);
  screen.println("Version");
  screen.setCursor(0, 120);
  screen.println( sver );

}
// isDisplay C4002
void isDisplayC4002(){

  // DFRobot Display 240x320
  // Text Display
  // Text Wrap
  screen.setTextWrap(false);
  // Rotation
  screen.setRotation(3);
  // Fill Screen => white
  screen.fillScreen(0xffff);
  // Text Color => blue
  screen.setTextColor(0x001F);
    // Font => Free Sans Bold 12pt
  screen.setFont(&FreeSansBold12pt7b);
  // TextSize => 1.5
  screen.setTextSize(1.5);
  // ENS160 Air Quality Sensor
  screen.setCursor(0, 30);
  screen.println("C4002 Human Presence");
  // Status
  screen.setCursor(0, 60);
  screen.print("Light ");
  screen.setCursor(70, 60);
  screen.print( sLight );
  screen.setCursor(250, 60);
  screen.println("lux");
  // Target
  screen.setCursor(0, 90);
  screen.print("Target ");
  screen.setCursor(90, 90);
  screen.println( sTarget );
  // Presence
  screen.setCursor(0, 120);
  screen.print("Presence: ");
  screen.setCursor(130, 120);
  screen.println( sPreDis );
  screen.setCursor(250, 120);
  screen.println( "CM" );
  // 
  screen.setCursor(0, 150);
  screen.print("Motion: ");
  screen.setCursor(110, 150);
  screen.println( sMot );

}

setup.ino

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

  Serial.begin(115200);

    // Delay
  delay( 100 );

  // C4002 mmWave Human Presence
  isSetupC4002();

  // Delay
  delay(100);

  // DFRobot Display 320x480
  screen.begin();

  // Delay
  delay( 100 );

  // DFRobot Display 320x480 - UID
  // Don Luc Electronics
  // Versioc
  isDisplayUID();
  
  // Delay
  delay( 5000 );

}

——

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

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

  • Programming Language
  • Single-Board 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

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
TikTok: https://www.tiktok.com/@luc.paquin8
Hackster: https://www.hackster.io/luc-paquin
LinkedIn: https://www.linkedin.com/in/jlucpaquin/

Don Luc

Project #15: Environment – ENS160 Air Quality Sensor – Mk46

——

#DonLucElectronics #DonLuc #ENS160 #BME280 #Environment #FireBeetle2ESP32C6 #ESP32 #Display #IoT #Project #Fritzing #Programming #Electronics #Microcontrollers #Consultant

——

ENS160 Air Quality Sensor

——

ENS160 Air Quality Sensor

——

ENS160 Air Quality Sensor

——

ENS160 Air Quality Sensor

This Gravity: ENS160 Air Quality Sensor, based on ScioSense’s new ENS160 sensor chip, is specifically designed for indoor air quality monitoring and offers detection of multiple IAQ data (TVOC, eCO2, AQI). The innovative TrueVOC™ technology combines the metal oxide (MOX) technology that brings this sensor superior accuracy, fast response, anti-interference, etc. With intelligent on-chip algorithms, the ENS160 can directly output rich and easy-to-understand environmental data. Preheat the sensor 3 minutes before use then you can obtain accurate data more quickly. What’s more, the built-in automatic baseline correction algorithm ensures the long-term stability of the sensor.

DL2608Mk03

1 x FireBeetle 2 ESP32-C6
1 x Fermion: 2.0″ 320×240 IPS TFT LCD
1 x GDL Line 10 CM
1 x Fermion: ENS160+BME280 Environmental Sensor
1 x Lithium Ion Battery – 1000mAh
1 x USB 3.0 to Type-C Cable

DL2608Mk03p

DL2608Mk03p.ino

/****** Don Luc Electronics © ******
Software Version Information
Project #15: Environment – ENS160 Air Quality Sensor – Mk46
15-46
DL2608Mk03p.ino
DL2608Mk03
1 x FireBeetle 2 ESP32-C6
1 x Fermion: 2.0" 320x240 IPS TFT LCD
1 x GDL Line 10 CM
1 x Fermion: ENS160+BME280 Environmental Sensor
1 x Lithium Ion Battery - 1000mAh
1 x USB 3.0 to Type-C Cable
*/

// Include the Library Code
// DFRobot Display GDL API
#include <DFRobot_GDL.h>
// BME280 Environmental
#include <DFRobot_BME280.h>
// ENS160 Air Quality Sensor
#include <DFRobot_ENS160.h>

// ENS160 Air Quality Sensor
// I2C communication.
#define I2C_COMMUNICATION  
// I2C address is 0x53
DFRobot_ENS160_I2C ENS160(&Wire, 0x53);
// Status
uint8_t Status;
// AQI
uint8_t AQI;
// TVOC
uint16_t TVOC;
// ECO2
uint16_t ECO2;

// BME280 Environmental
typedef DFRobot_BME280_IIC BME;
// Wire
BME   bme(&Wire, 0x76);
// Sea Level Pressure
#define SEA_LEVEL_PRESSURE 1015.0f
// Temperature
float   temp = bme.getTemperature();
// Pressure
uint32_t    press = bme.getPressure();
// Altitude
float alti;
// Humidity
float humi;

// Defined ESP32
#define TFT_DC  D2
#define TFT_CS  D6
#define TFT_RST D3

/*dc=*/ /*cs=*/ /*rst=*/
// DFRobot Display 240x320
DFRobot_ST7789_240x320_HW_SPI screen(TFT_DC, TFT_CS, TFT_RST);

// Software Version Information
String sver = "15-46";

void loop() {
  
  // isBME280
  isBME280();
  
  // isENS160
  isENS160();
  
  // isDisplay ENS160
  isDisplayENS160();

  // Delay 1 Second
  delay( 1000 );
  
}

getBME280.ino

// BME280 Environmental
// isBME280
void isBME280(){

  // Temperature
  temp = bme.getTemperature();
  // Pressure
  press = bme.getPressure();
  // Altitude
  alti = bme.calAltitude(SEA_LEVEL_PRESSURE, press);
  // Humidity
  humi = bme.getHumidity();

}

getDisplay.ino

// DFRobot Display 240x320
// DFRobot Display 240x320 - UID
void isDisplayUID(){

  // DFRobot Display 240x320
  // Text Display
  // Text Wrap
  screen.setTextWrap(false);
  // Rotation
  screen.setRotation(3);
  // Fill Screen => black
  screen.fillScreen(0x0000);
  // Text Color => white
  screen.setTextColor(0xffff);
  // Font => Free Mono 9pt
  screen.setFont(&FreeMono9pt7b);
  // TextSize => 1.5
  screen.setTextSize(1.5);
  // Don Luc Electronics
  screen.setCursor(0, 30);
  screen.println("Don Luc Electronics");
  // BME280 Environmental
  screen.setCursor(0, 60);
  screen.println("ENS160 Air Quality Sensor");
  // Version
  screen.setCursor(0, 90);
  screen.println("Version");
  screen.setCursor(0, 120);
  screen.println( sver );

}
// isDisplay ENS160
void isDisplayENS160(){

  // DFRobot Display 240x320
  // Text Display
  // Text Wrap
  screen.setTextWrap(false);
  // Rotation
  screen.setRotation(3);
  // Fill Screen => black
  screen.fillScreen(0x0000);
  // Text Color => white
  screen.setTextColor(0xffff);
  // Font => Free Mono 9pt
  screen.setFont(&FreeMono9pt7b);
  // TextSize => 1.5
  screen.setTextSize(1.5);
  // ENS160 Air Quality Sensor
  screen.setCursor(0, 30);
  screen.println("ENS160 Air Quality Sensor");
  // AQI
  screen.setCursor(0, 60);
  screen.print("AQI : ");
  screen.setCursor(70, 60);
  screen.println( AQI );
  // TVOC
  screen.setCursor(0, 90);
  screen.print("TVOC: ");
  screen.setCursor(70, 90);
  screen.print( TVOC );
  screen.setCursor(150, 90);
  screen.println( "ppb" );
  // ECO2
  screen.setCursor(0, 120);
  screen.print("ECO2: ");
  screen.setCursor(70, 120);
  screen.print( ECO2 );
  screen.setCursor(150, 120);
  screen.println( "ppb" );
  // Temperature
  screen.setCursor(0, 150);
  screen.print("Temp: ");
  screen.setCursor(70, 150);
  screen.print( temp );
  screen.setCursor(150, 150);
  screen.println( "C" );
  // Humidity
  screen.setCursor(0, 180);
  screen.print("Humi: ");
  screen.setCursor(70, 180);
  screen.print( humi );
  screen.setCursor(150, 180);
  screen.println( "%" );

}

getENS160.ino

// ENS160 Air Quality Sensor
// isENS160
void isENS160(){

  // Status - Return value: 0-Normal operation 1-Warm-Up phase 
  // 2-Initial Start-Up phase
  Status = ENS160.getENS160Status();

  // AQI - Return value: 1-Excellent, 2-Good, 3-Moderate, 4-Poor, 5-Unhealthy
  AQI = ENS160.getAQI();

  // TVOC - Return value range: 0–65000, unit: ppb
  TVOC = ENS160.getTVOC();

  // ECO2 = Return value range: 400–65000, unit: ppm
  // Five levels: Excellent(400 - 600), Good(600 - 800), Moderate(800 - 1000), 
  // Poor(1000 - 1500), Unhealthy(> 1500)
  ECO2 = ENS160.getECO2();

}

setup.ino

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

  // DFRobot Display 128x160
  screen.begin();

  // Delay
  delay( 100 );

  // BME280 Environmental
  bme.begin();

  // Delay
  delay( 100 );

  // ENS160 Air Quality Sensor
  ENS160.begin();
  /**
   * Set power mode
   * mode Configurable power mode:
   * ENS160_SLEEP_MODE: DEEP SLEEP mode (low power standby)
   * ENS160_IDLE_MODE: IDLE mode (low-power)
   * ENS160_STANDARD_MODE: STANDARD Gas Sensing Modes
   */
  ENS160.setPWRMode(ENS160_STANDARD_MODE);

  /**
   * Users write ambient temperature and relative humidity into ENS160 for
   * calibration and compensation of the measured gas data.
   * ambientTemp Compensate the current ambient temperature, float type, unit: C
   * relativeHumidity Compensate the current ambient humidity, float type, unit: %rH
   * Temperature
   * Humidity=
   */
  ENS160.setTempAndHum(temp, humi);

  // Delay
  delay( 100 );

  // DFRobot Display 240x320 - UID
  // Don Luc Electronics
  // Versioc
  isDisplayUID();
  
  // Delay
  delay( 5000 );

}

——

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

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

  • Programming Language
  • Single-Board 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

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
TikTok: https://www.tiktok.com/@luc.paquin8
Hackster: https://www.hackster.io/luc-paquin
LinkedIn: https://www.linkedin.com/in/jlucpaquin/

Don Luc

Project #15: Environment – BME280 Environmental – Mk45

——

#DonLucElectronics #DonLuc #BME280 #Environment #FireBeetle2ESP32C6 #ESP32 #Display #IoT #Project #Fritzing #Programming #Electronics #Microcontrollers #Consultant

——

BME280 Environmental

——

BME280 Environmental

——

BME280 Environmental

——

Fermion: ENS160+BME280 Environmental Sensor

BME280 is an environmental sensor that integrates onboard temperature sensor, humidity sensor and barometer. The sensor is of high precision, multiple functions, and small size etc. It provides both SPI and I2C interfaces, which make it easy to make a fast prototypes. It can be widely used in environmental monitoring, story height measurement and Internet of Things (IoT) control and so on. Gravity I2C BME280 Environmental Sensor has based on BoSCH newest MEMS sensor. Therefore, the stable and multi-function make BME280 become a good choice in many scenes.

DL2608Mk02

1 x FireBeetle 2 ESP32-C6
1 x Fermion: 2.0″ 320×240 IPS TFT LCD
1 x GDL Line 10 CM
1 x Fermion: ENS160+BME280 Environmental Sensor
1 x Lithium Ion Battery – 1000mAh
1 x USB 3.0 to Type-C Cable

DL2608Mk02p

DL2608Mk02p.ino

/****** Don Luc Electronics © ******
Software Version Information
Project #15: Environment – BME280 Environmental – Mk45
15-45
DL2608Mk02p.ino
DL2608Mk02
1 x FireBeetle 2 ESP32-C6
1 x Fermion: 2.0" 320x240 IPS TFT LCD
1 x GDL Line 10 CM
1 x Fermion: ENS160+BME280 Environmental Sensor
1 x Lithium Ion Battery - 1000mAh
1 x USB 3.0 to Type-C Cable
*/

// Include the Library Code
// DFRobot Display GDL API
#include <DFRobot_GDL.h>
// BME280 Environmental
#include <DFRobot_BME280.h>

// BME280 Environmental
typedef DFRobot_BME280_IIC BME;
// Wire
BME   bme(&Wire, 0x76);
// Sea Level Pressure
#define SEA_LEVEL_PRESSURE 1015.0f
// Temperature
float   temp = bme.getTemperature();
// Pressure
uint32_t    press = bme.getPressure();
// Altitude
float alti;
// Humidity
float humi;

// Defined ESP32
#define TFT_DC  D2
#define TFT_CS  D6
#define TFT_RST D3

/*dc=*/ /*cs=*/ /*rst=*/
// DFRobot Display 240x320
DFRobot_ST7789_240x320_HW_SPI screen(TFT_DC, TFT_CS, TFT_RST);

// Software Version Information
String sver = "15-45";

void loop() {
  
  // isBME280
  isBME280();
  
  // isDisplay BME280
  isDisplayBME280();

  // Delay 1 Second
  delay( 1000 );
  
}

getBME280.ino

// BME280 Environmental
// isBME280
void isBME280(){

  // Temperature
  temp = bme.getTemperature();
  // Pressure
  press = bme.getPressure();
  // Altitude
  alti = bme.calAltitude(SEA_LEVEL_PRESSURE, press);
  // Humidity
  humi = bme.getHumidity();

}

getDisplay.ino

// DFRobot Display 240x320
// DFRobot Display 240x320 - UID
void isDisplayUID(){

  // DFRobot Display 240x320
  // Text Display
  // Text Wrap
  screen.setTextWrap(false);
  // Rotation
  screen.setRotation(3);
  // Fill Screen => black
  screen.fillScreen(0x0000);
  // Text Color => white
  screen.setTextColor(0xffff);
  // Font => Free Mono 9pt
  screen.setFont(&FreeMono9pt7b);
  // TextSize => 1.5
  screen.setTextSize(1.5);
  // Don Luc Electronics
  screen.setCursor(0, 30);
  screen.println("Don Luc Electronics");
  // BME280 Environmental
  screen.setCursor(0, 60);
  screen.println("BME280 Environmental");
  // Version
  screen.setCursor(0, 90);
  screen.println("Version");
  screen.setCursor(0, 120);
  screen.println( sver );

}
// isDisplay BME280
void isDisplayBME280(){

  // DFRobot Display 240x320
  // Text Display
  // Text Wrap
  screen.setTextWrap(false);
  // Rotation
  screen.setRotation(3);
  // Fill Screen => black
  screen.fillScreen(0x0000);
  // Text Color => white
  screen.setTextColor(0xffff);
  // Font => Free Mono 9pt
  screen.setFont(&FreeMono9pt7b);
  // TextSize => 1.5
  screen.setTextSize(1.5);
  // BME280 Environmental
  screen.setCursor(0, 30);
  screen.println("BME280 Environmental");
  // Temperature
  screen.setCursor(0, 60);
  screen.print("Temp: ");
  screen.setCursor(70, 60);
  screen.print( temp );
  screen.setCursor(160, 60);
  screen.println( "°C" );
  // Pressure
  screen.setCursor(0, 90);
  screen.print("Pres: ");
  screen.setCursor(70, 90);
  screen.print( press );
  screen.setCursor(160, 90);
  screen.println( "Pa" );
  // Altitude
  screen.setCursor(0, 120);
  screen.print("Alti: ");
  screen.setCursor(70, 120);
  screen.print( alti );
  screen.setCursor(160, 120);
  screen.println( "M" );
  // Humidity
  screen.setCursor(0, 150);
  screen.print("Humi: ");
  screen.setCursor(70, 150);
  screen.print( humi );
  screen.setCursor(160, 150);
  screen.println( "%" );

}

setup.ino

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

  // DFRobot Display 128x160
  screen.begin();

  // Delay
  delay( 100 );

  // BME280 Environmental
  bme.begin();

  // Delay
  delay( 100 );

  // DFRobot Display 240x320 - UID
  // Don Luc Electronics
  // Versioc
  isDisplayUID();
  
  // Delay
  delay( 5000 );

}

——

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

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

  • Programming Language
  • Single-Board 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

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
TikTok: https://www.tiktok.com/@luc.paquin8
Hackster: https://www.hackster.io/luc-paquin
LinkedIn: https://www.linkedin.com/in/jlucpaquin/

Don Luc

Project #15: Environment – GPS and RTC – Mk48

——

#DonLucElectronics #DonLuc #GPS #RTC #Environment #FireBeetle2ESP32E #ESP32 #Display #IoT #Project #Fritzing #Programming #Electronics #Microcontrollers #Consultant

——-

GPS and RTC

——

GPS and RTC

——

GPS and RTC

——

Gravity: GNSS GPS BeiDou Receiver Module

The GNSS receiver module supports multiple satellite systems for accurate, high-speed positioning in various environments. It’s compatible with I2C/UART devices. GNSS stands for Global Navigation Satellite System. The main GNSS systems include GPS, GLONASS, QZSS, and BeiDou. These satellite systems transmit signals to the earth, allowing the receiver to determine its own position by calculating the propagation time of the signals and the position of the receiving satellite, thus achieving functions such as positioning and navigation.

Gravity: I2C SD2405 RTC Module

The I2C SD2405 RTC module features accurate real-time clock, dual power supply, low power consumption, periodic interrupts, and a high precision time trimming circuit. The SD2405AL is dual power supply system. When the primary power supply goes down to an assigned value or resumes from low power, the system can switch between the primary power supply and battery automatically. Even there is no external power, it can still work for 5~8 years, 1uA ultra-low power consumption.

DL2608Mk05

1 x FDFRobot FireBeetle 2 ESP32-E
1 x Fermion: 3.5” 480×320 TFT LCD Capacitive
1 x GDL Line 10 CM
1 x Gravity: GNSS GPS BeiDou Receiver Module
1 x Gravity: I2C SD2405 RTC Module
1 x Gravity: IO Shield for FireBeetle 2
1 x Terminal Block Board for FireBeetle 2 ESP32-E IoT
1 x Lithium Ion Battery – 1000mAh
1 x USB 3.0 to Type-C Cable

DL2608Mk05p

DL2608Mk05p.ino

/****** Don Luc Electronics © ******
Software Version Information
Project #15: Environment – GPS and RTC – Mk48
15-48
DL2608Mk05p.ino
DL2608Mk05
1 x DFRobot FireBeetle 2 ESP32-E
1 x Fermion: 3.5” 480x320 TFT LCD Capacitive
1 x GDL Line 10 CM
1 x Gravity: GNSS GPS BeiDou Receiver Module
1 x Gravity: I2C SD2405 RTC Module
1 x Gravity: IO Shield for FireBeetle 2
1 x Terminal Block Board for FireBeetle 2 ESP32-E IoT
1 x Lithium Ion Battery - 1000mAh
1 x USB 3.0 to Type-C Cable
*/

// Include the Library Code
// DFRobot Display GDL API
#include <DFRobot_GDL.h>
// GNSS GPS
#include <DFRobot_GNSS.h>
// RTC (Real-Time Clock)
#include "GravityRtc.h"

// RTC Initialization
GravityRtc rtc;
// Date and Time
String dateRTC = "";
String timeRTC = "";

// GNSS GPS
// Use I2C for communication, but use the serial port for
// communication if the line of codes were masked
#define I2C_COMMUNICATION
// ESP32 user hardware uart
DFRobot_GNSS_I2C gnss(&Wire, GNSS_DEVICE_ADDR);
String sDate = "";
String sUTC = "";
String sLat = "";
String sLon = "";
String sAlt = "";

// Defined ESP32
#define TFT_DC  D2
#define TFT_CS  D6
#define TFT_RST D3

/*dc=*/ /*cs=*/ /*rst=*/
// DFRobot Display 320x480
DFRobot_ILI9488_320x480_HW_SPI screen(TFT_DC, TFT_CS, TFT_RST);

// Software Version Information
String sver = "15-48";

void loop() {
  
  // isGNSS
  isGNSS();

  // RTC (Real-Time Clock)
  isRTC();

  // isDisplay GPS RTC
  isDisplayGPSRTC();

  // Delay 1 Second
  delay( 1000 );

}

getDisplay.ino

// DFRobot Display 320x480
// DFRobot Display 320x480 - UID
void isDisplayUID(){

  // DFRobot Display 320x480
  // Text Display
  // Text Wrap
  screen.setTextWrap(false);
  // Rotation
  screen.setRotation(3);
  // Fill Screen => black
  screen.fillScreen(0x0000);
  // Text Color => white
  screen.setTextColor(0xffff);
  // Font => Free Sans Bold 12pt
  screen.setFont(&FreeSansBold12pt7b);
  // TextSize => 1.5
  screen.setTextSize(1.5);
  // Don Luc Electronics
  screen.setCursor(0, 30);
  screen.println("Don Luc Electronics");
  // Tilt Switch
  screen.setCursor(0, 60);
  screen.println("GPS and RTC");
  // Version
  screen.setCursor(0, 90);
  screen.println("Version");
  screen.setCursor(0, 120);
  screen.println( sver );

}
// isDisplay GPS RTC
void isDisplayGPSRTC(){

  // DFRobot Display 320x480
  // Text Display
  // Text Wrap
  screen.setTextWrap(false);
  // Rotation
  screen.setRotation(3);
  // Fill Screen => white
  screen.fillScreen(0xffff);
  // Text Color => blue
  screen.setTextColor(0x001F);
  // Font => Free Sans Bold 12pt
  screen.setFont(&FreeSansBold12pt7b);
  // TextSize => 1.5
  screen.setTextSize(1.5);
  // IP65 Capacitive Soil Moisture Sensor
  screen.setCursor(0, 30);
  screen.println("GPS and RTC");
  // Latitude
  screen.setCursor(0, 70);
  screen.println("Latitude: ");
  screen.setCursor(170, 70);
  screen.println( sLat );
  // Longitude
  screen.setCursor(0, 100);
  screen.print("Longitude: ");
  screen.setCursor(170, 100);
  screen.println( sLon );
  // GPS Date
  screen.setCursor(0, 130);
  screen.println("GPS Date: ");
  screen.setCursor(170, 130);
  screen.println( sDate );
  // GPS Time
  screen.setCursor(0, 160);
  screen.println("GPS Time: ");
  screen.setCursor(170, 160);
  screen.println( sUTC );
  // Altitude
  screen.setCursor(0, 190);
  screen.println("GPS Altitude: ");
  screen.setCursor(170, 190);
  screen.print( sAlt );
  screen.setCursor(290, 190);
  screen.println( "M" );
  // Date
  screen.setCursor(0, 220);
  screen.println("Date: ");
  screen.setCursor(170, 220);
  screen.println( dateRTC );
  // Time
  screen.setCursor(0, 250);
  screen.println("Time: ");
  screen.setCursor(170, 250);
  screen.println( timeRTC );
  
}

getGNSS.ino

// GNSS
// isSetupGNSS
void isSetupGNSS(){
  
  // GNSS
  gnss.begin();
  
  // GNSS
  gnss.enablePower();      
/** Set the galaxy to be used
 *   eGPS              USE gps
 *   eBeiDou           USE beidou
 *   eGPS_BeiDou       USE gps + beidou
 *   eGLONASS          USE glonass
 *   eGPS_GLONASS      USE gps + glonass
 *   eBeiDou_GLONASS   USE beidou +glonass
 *   eGPS_BeiDou_GLONASS USE gps + beidou + glonass
 */
  gnss.setGnss(eGPS_BeiDou_GLONASS);
  // GNSS
  // gnss.setRgbOff();
  gnss.setRgbOn();
  
}
// isGNSS
void isGNSS(){

  // GNSS
  sTim_t utc = gnss.getUTC();
  sTim_t date = gnss.getDate();
  sLonLat_t lat = gnss.getLat();
  sLonLat_t lon = gnss.getLon();
  double high = gnss.getAlt();
  
  sDate = "";
  sUTC = "";
  sLat = "";
  sLon = "";
  sAlt = "";
  // Latitude
  sLat = lat.latitudeDegree;
  // Longitude
  sLon = lon.lonitudeDegree;
  // Date
  sDate = date.year;
  sDate = sDate + "/";
  sDate = sDate + date.month;
  sDate = sDate + "/";
  sDate = sDate + date.date;
  // UTC
  sUTC = utc.hour;
  sUTC = sUTC + ":";
  sUTC = sUTC + utc.hour;
  sUTC = sUTC + ":";
  sUTC = sUTC + utc.minute;
  // Altitude
  sAlt = high;

}

getRTC.ino

// Real-Time Tlock
// Date and Time RTC
void isRTC () {

  // Date and Time
  dateRTC = "";
  timeRTC = "";
  rtc.read();
  
  // Date
  dateRTC = rtc.year; 
  dateRTC = dateRTC + "/";
  dateRTC = dateRTC + rtc.month;
  dateRTC = dateRTC + "/";
  dateRTC = dateRTC + rtc.day;

  // Time
  timeRTC = rtc.hour;
  timeRTC = timeRTC + ":";
  timeRTC = timeRTC + rtc.minute;
  timeRTC = timeRTC + ":";
  timeRTC = timeRTC + rtc.second;
  
}

setup.ino

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

  // isSetupGNSS
  isSetupGNSS();

  // Delay
  delay(100);

  // Setup RTC
  rtc.setup();

  //Set the RTC time automatically: Calibrate RTC time by your computer time
  rtc.adjustRtc(F(__DATE__), F(__TIME__));

  // Delay
  delay(100);

  // DFRobot Display 320x480
  screen.begin();

  // Delay
  delay( 100 );

  // DFRobot Display 320x480 - UID
  // Don Luc Electronics
  // Version
  isDisplayUID();

  // Wait for the sensor to heat up for 20 seconds
  delay( 5000 );

}

——

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

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

  • Programming Language
  • Single-Board 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

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
TikTok: https://www.tiktok.com/@luc.paquin8
Hackster: https://www.hackster.io/luc-paquin
LinkedIn: https://www.linkedin.com/in/jlucpaquin/

Don Luc

Project #15: Environment – IP65 Capacitive Soil Moisture Sensor – Mk44

——

#DonLucElectronics #DonLuc #IP65SoilMoisture #Environment #FireBeetle2ESP32E #ESP32 #Display #IoT #Project #Fritzing #Programming #Electronics #Microcontrollers #Consultant

——

IP65 Capacitive Soil Moisture Sensor

——

IP65 Capacitive Soil Moisture Sensor

——

IP65 Capacitive Soil Moisture Sensor

——

Gravity: IP65 Capacitive Soil Moisture Sensor

The Gravity Capacitive Soil Moisture Sensor offers IP65 waterproof protection and corrosion resistance, designed for long-term outdoor gardening, automated irrigation systems, and environmental science projects. Using advanced capacitive sensing technology, it outperforms traditional resistive sensors with higher accuracy and durability in humid or wet soil. This sensor provides an analog output signal, ensuring reliable moisture monitoring for optimal plant health in harsh outdoor conditions like balconies, gardens, and farms.

DL2607Mk01

1 x DFRobot FireBeetle 2 ESP32-E
1 x Fermion: 3.5” 480×320 TFT LCD Capacitive
1 x GDL Line 10 CM
1 x Gravity: IP65 Capacitive Soil Moisture Sensor
1 x Gravity: AHT20 Temperature and Humidity Sensor
1 x Gravity: IO Shield for FireBeetle 2
1 x Terminal Block Board for FireBeetle 2 ESP32-E IoT
1 x Lithium Ion Battery – 1000mAh
1 x USB 3.0 to Type-C Cable

DL2607Mk01p

DL2607Mk01p.ino

/****** Don Luc Electronics © ******
Software Version Information
Project #15: Environment – IP65 Capacitive Soil Moisture Sensor – Mk44
15-44
DL2607Mk01p.ino
DL2607Mk01
1 x DFRobot FireBeetle 2 ESP32-E
1 x Fermion: 3.5” 480x320 TFT LCD Capacitive
1 x GDL Line 10 CM
1 x Gravity: IP65 Capacitive Soil Moisture Sensor
1 x Gravity: AHT20 Temperature and Humidity Sensor
1 x Gravity: IO Shield for FireBeetle 2
1 x Terminal Block Board for FireBeetle 2 ESP32-E IoT
1 x Lithium Ion Battery - 1000mAh
1 x USB 3.0 to Type-C Cable
*/

// Include the Library Code
// EEPROM Library to Read and Write EEPROM with Unique ID for Unit
#include "EEPROM.h"
// DFRobot Display GDL API
#include <DFRobot_GDL.h>
// AHT20 Humidity and Temperature Sensor
#include <DFRobot_AHT20.h>

// AHT20 Humidity and Temperature Sensor
DFRobot_AHT20 aht20;
// AHT20 Humidity and Temperature Sensor
float h = 0;
float t = 0;

// IP65 Capacitive Soil Moisture Sensor
int iSoilMoisture = A0;
// You need to change this value that you had recorded in the air
const int AirValue = 570; 
// You need to change this value that you had recorded in the water
const int WaterValue = 39;
// Intervals
int intervals = (AirValue - WaterValue)/3;
int soilMoistureValue = 0;
// sVal
String sVal = "";

// Defined ESP32
#define TFT_DC  D2
#define TFT_CS  D6
#define TFT_RST D3

/*dc=*/ /*cs=*/ /*rst=*/
// DFRobot Display 320x480
DFRobot_ILI9488_320x480_HW_SPI screen(TFT_DC, TFT_CS, TFT_RST);

// Software Version Information
String sver = "15-44";

void loop() {
  
  // isIP65
  isIP65();

  // AHT20 Humidity and Temperature Sensor
  isHT();

  // isDisplay HTS
  isDisplayHTS();

  // Delay 1 Second
  delay( 1000 );

}

getDisplay.ino

// DFRobot Display 320x480
// DFRobot Display 320x480 - UID
void isDisplayUID(){

  // DFRobot Display 320x480
  // Text Display
  // Text Wrap
  screen.setTextWrap(false);
  // Rotation
  screen.setRotation(3);
  // Fill Screen => black
  screen.fillScreen(0x0000);
  // Text Color => white
  screen.setTextColor(0xffff);
  // Font => Free Sans Bold 12pt
  screen.setFont(&FreeSansBold12pt7b);
  // TextSize => 1.5
  screen.setTextSize(1.5);
  // Don Luc Electronics
  screen.setCursor(0, 30);
  screen.println("Don Luc Electronics");
  // Tilt Switch
  screen.setCursor(0, 60);
  screen.println("IP65 Capacitive Soil Moisture Sensor");
  // Version
  screen.setCursor(0, 90);
  screen.println("Version");
  screen.setCursor(0, 120);
  screen.println( sver );

}
// isDisplay HTS
void isDisplayHTS(){

  // DFRobot Display 320x480
  // Text Display
  // Text Wrap
  screen.setTextWrap(false);
  // Rotation
  screen.setRotation(3);
  // Fill Screen => white
  screen.fillScreen(0xffff);
  // Text Color => blue
  screen.setTextColor(0x001F);
  // Font => Free Sans Bold 12pt
  screen.setFont(&FreeSansBold12pt7b);
  // TextSize => 1.5
  screen.setTextSize(1.5);
  // IP65 Capacitive Soil Moisture Sensor
  screen.setCursor(0, 30);
  screen.println("IP65 Capacitive Soil Moisture Sensor");
  // Humidity
  screen.setCursor(0, 70);
  screen.println("Humidity");
  screen.setCursor(0, 100);
  screen.print( h );
  screen.setCursor(65, 100);
  screen.println( "%RH" );
  // Temperature
  screen.setCursor(0, 140);
  screen.println("Temperature");
  screen.setCursor(0, 170);
  screen.print( t );
  screen.setCursor(65, 170);
  screen.println( "C" );
  // Soil Moisture
  screen.setCursor(0, 210);
  screen.println("Soil Moisture");
  screen.setCursor(0, 240);
  screen.println( sVal );

}

getHT.ino

// AHT20 Humidity and Temperature Sensor
void isHT(){

  if(aht20.startMeasurementReady(true)){

    // Humidity
    h = aht20.getHumidity_RH();
  
    // Temperature
    t = aht20.getTemperature_C();
    
   }
  
}

getIP65.ino

// AHT20 Humidity and Temperature Sensor
void isHT(){

  if(aht20.startMeasurementReady(true)){

    // Humidity
    h = aht20.getHumidity_RH();
  
    // Temperature
    t = aht20.getTemperature_C();
    
   }
  
}

setup.ino

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

  // AHT20 Humidity and Temperature Sensor
  aht20.begin();

  // Delay
  delay(100);

  // DFRobot Display 320x480
  screen.begin();

  // Delay
  delay( 100 );

  // DFRobot Display 320x480 - UID
  // Don Luc Electronics
  // Version
  // EEPROM
  isDisplayUID();

  // Wait for the sensor to heat up for 20 seconds
  delay( 5000 );

}

——

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

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

  • Programming Language
  • Single-Board 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

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
TikTok: https://www.tiktok.com/@luc.paquin8
Hackster: https://www.hackster.io/luc-paquin
LinkedIn: https://www.linkedin.com/in/jlucpaquin/

Don Luc

Project #28 – Sensors – Piezo Disk Vibration – Mk30

——

#DonLucElectronics #DonLuc #PiezoDiskVibration #FireBeetle2ESP32E #ESP32 #Display #IoT #Project #Fritzing #Programming #Electronics #Microcontrollers #Consultant

——

Piezo Disk Vibration

——

Piezo Disk Vibration

——

Piezo Disk Vibration

——

Gravity: Digital Piezo Disk Vibration Sensor

The DFRobot Vibration Sensor buffers a piezoelectric transducer that responds to strain changes by generating a measurable output voltage change which is proportional with the strength of vibration. So you can know the extent of vibration. Different from digital vibration sensor that only accounts times, this analog one can tell extent of vibration.

DL2604Mk02

1 x DFRobot FireBeetle 2 ESP32-E
1 x Fermion: 3.5” 480×320 TFT LCD Capacitive
1 x GDL Line 10 CM
1 x Gravity: Digital Piezo Disk Vibration Sensor
1 x Gravity: IO Shield for FireBeetle 2
1 x Terminal Block Board for FireBeetle 2 ESP32-E IoT
1 x Lithium Ion Battery – 1000mAh
1 x USB 3.0 to Type-C Cable

DL2604Mk02p

DL2604Mk02p.ino

/****** Don Luc Electronics © ******
Software Version Information
Project #28 – Sensors – Piezo Disk Vibration – Mk30
28-30
DL2604Mk02p.ino
DL2604Mk02
1 x DFRobot FireBeetle 2 ESP32-E
1 x Fermion: 3.5” 480x320 TFT LCD Capacitive
1 x GDL Line 10 CM
1 x Gravity: Digital Piezo Disk Vibration Sensor
1 x Gravity: IO Shield for FireBeetle 2
1 x Terminal Block Board for FireBeetle 2 ESP32-E IoT
1 x Lithium Ion Battery - 1000mAh
1 x USB 3.0 to Type-C Cable
*/

// Include the Library Code
// EEPROM Library to Read and Write EEPROM with Unique ID for Unit
#include "EEPROM.h"
// DFRobot Display GDL API
#include <DFRobot_GDL.h>

// Vibration Sensor
int iVibration = A0;
int iVal;

// Defined ESP32
#define TFT_DC  D2
#define TFT_CS  D6
#define TFT_RST D3

/*dc=*/ /*cs=*/ /*rst=*/
// DFRobot Display 320x480
DFRobot_ILI9488_320x480_HW_SPI screen(TFT_DC, TFT_CS, TFT_RST);

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

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

void loop() {
  
  // Vibration Sensor
  isVibration();

  // isDisplay Vibration
  isDisplayVibration();

  // Delay 1 Second
  delay( 1000 );

}

getDisplay.ino

// DFRobot Display 320x480
// DFRobot Display 320x480 - UID
void isDisplayUID(){

  // DFRobot Display 320x480
  // Text Display
  // Text Wrap
  screen.setTextWrap(false);
  // Rotation
  screen.setRotation(3);
  // Fill Screen => black
  screen.fillScreen(0x0000);
  // Text Color => white
  screen.setTextColor(0xffff);
  // Font => Free Sans Bold 12pt
  screen.setFont(&FreeSansBold12pt7b);
  // TextSize => 1.5
  screen.setTextSize(1.5);
  // Don Luc Electronics
  screen.setCursor(0, 30);
  screen.println("Don Luc Electronics");
  // Tilt Switch
  screen.setCursor(0, 60);
  screen.println("Vibration Senson");
  // Version
  screen.setCursor(0, 90);
  screen.println("Version");
  screen.setCursor(0, 120);
  screen.println( sver );
  // EEPROM
  screen.setCursor(0, 150);
  screen.println("EEPROM");
  screen.setCursor(0, 180);
  screen.println( uid );

}
// isDisplay Vibration
void isDisplayVibration(){

  // DFRobot Display 320x480
  // Text Display
  // Text Wrap
  screen.setTextWrap(false);
  // Rotation
  screen.setRotation(3);
  // Fill Screen => white
  screen.fillScreen(0xffff);
  // Text Color => blue
  screen.setTextColor(0x001F);
  // Font => Free Sans Bold 12pt
  screen.setFont(&FreeSansBold12pt7b);
  // TextSize => 1.5
  screen.setTextSize(1.5);
  // Vibration Senso
  screen.setCursor(0, 30);
  screen.println("Vibration Sensor");
  // Vibration Sensor
  screen.setCursor(0, 70);
  screen.print( "Val: " );
  screen.setCursor(70, 70);
  screen.println( iVal );
  
}

getEEPROM.ino

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

getVibration.ino

// Vibration Sensor
// is Vibration
void isVibration(){

  // Vibration Sensor
  // iVal
  iVal = analogRead( iVibration );

}

setup.ino

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

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

  // Delay
  delay(100);

  // DFRobot Display 320x480
  screen.begin();

  // Delay
  delay( 100 );

  // DFRobot Display 320x480 - UID
  // Don Luc Electronics
  // Version
  // EEPROM
  isDisplayUID();

  // Delay 5 Second
  delay( 5000 );

}

——

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

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

  • Programming Language
  • Single-Board 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

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.paquin8
Hackster: https://www.hackster.io/luc-paquin
LinkedIn: https://www.linkedin.com/in/jlucpaquin/

Don Luc

Project #15: Environment – Gravity: I2C SD2405 RTC – Mk38

——

#DonLucElectronics #DonLuc #RTC #SD #Buzzer #FlameSensor #AHT20 #FireBeetle2ESP32E #ESP32 #Display #IoT #Project #Fritzing #Programming #Electronics #Microcontrollers #Consultant

——

Gravity: I2C SD2405 RTC

——

Gravity: I2C SD2405 RTC

——

Gravity: I2C SD2405 RTC

——

Gravity: I2C SD2405 RTC Module

This is an extremely accurate I2C Real Time Clock (RTC) with crystal compensation, inner chargeable battery. The SD2405AL is available in industrial temperature ranges. The SD2405AL is dual power supply system. When the primary power supply goes down to an assigned value or resumes from low power, the system can switch between the primary power supply and battery automatically. Even there is no external power, it can still work for 5~8 years, 1uA ultra-low power consumption (inner battery).

DL2603Mk04

1 x DFRobot FireBeetle 2 ESP32-E
1 x Fermion: 3.5” 480×320 TFT LCD Capacitive
1 x GDL Line 10 CM
1 x Gravity: I2C SD2405 RTC Module
1 x Fermion: MicroSD Card Module
1 x MicroSD 2 GB
1 x Crowtail – Buzzer 2.0
1 x Gravity: AHT20 Temperature and Humidity Sensor
1 x Flame Sensor
1 x Crowtail – LED Green
1 x Gravity: IO Shield for FireBeetle 2
1 x Terminal Block Board for FireBeetle 2 ESP32-E IoT
1 x Lithium Ion Battery – 1000mAh
1 x USB 3.0 to Type-C Cable

DL2603Mk04p

DL2603Mk04p.ino

/****** Don Luc Electronics © ******
Software Version Information
Project #15: Environment - Gravity: I2C SD2405 RTC - Mk38
15-38
DL2603Mk04p.ino
DL2603Mk04
1 x DFRobot FireBeetle 2 ESP32-E
1 x Fermion: 3.5” 480x320 TFT LCD Capacitive
1 x GDL Line 10 CM
1 x Gravity: I2C SD2405 RTC Module
1 x Fermion: MicroSD Card Module
1 x MicroSD 2 GB
1 x Crowtail - Buzzer 2.0
1 x Gravity: AHT20 Temperature and Humidity Sensor
1 x Flame Sensor
1 x Crowtail - LED Green
1 x Gravity: IO Shield for FireBeetle 2
1 x Terminal Block Board for FireBeetle 2 ESP32-E IoT
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>
// DFRobot Display GDL API
#include <DFRobot_GDL.h>
// AHT20 Humidity and Temperature Sensor
#include <DFRobot_AHT20.h>
// SD Card
#include "FS.h"
#include "SD.h"
#include "SPI.h"
// RTC (Real-Time Clock)
#include <GravityRtc.h>

// RTC (Real-Time Clock) Initialization
GravityRtc rtc;
String dateRTC = "";
String timeRTC = "";

// MicroSD Card
const int chipSelect = D6;
String zzzzzz = "";

// Buzzer
int iBuzzer = D10;

// AHT20 Humidity and Temperature Sensor
DFRobot_AHT20 aht20;
// AHT20 Humidity and Temperature Sensor
float h = 0;
float t = 0;

// Flame Sensor
// LED Green
int iLEDG = D11;
// Flame Sensor
int iFlame =  A0;
String sF = "";

// Defined ESP32
#define TFT_DC  D2
#define TFT_CS  D6
#define TFT_RST D3

/*dc=*/ /*cs=*/ /*rst=*/
// DFRobot Display 320x480
DFRobot_ILI9488_320x480_HW_SPI screen(TFT_DC, TFT_CS, TFT_RST);

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

// Software Version Information
String sver = "15-38";

void loop() {
  
  // RTC (Real-Time Clock)
  isRTC();
  
  // AHT20 Humidity and Temperature Sensor
  isHT();
  
  // Flame Sensor
  isFlame();

  // isDisplay HT
  isDisplayHT();

  // Delay 0.1 Second
  delay( 100 );

}

getDisplay.ino

// DFRobot Display 320x480
// DFRobot Display 320x480 - UID
void isDisplayUID(){

  // DFRobot Display 320x480
  // Text Display
  // Text Wrap
  screen.setTextWrap(false);
  // Rotation
  screen.setRotation(3);
  // Fill Screen => black
  screen.fillScreen(0x0000);
  // Text Color => white
  screen.setTextColor(0xffff);
  // Font => Free Sans Bold 12pt
  screen.setFont(&FreeSansBold12pt7b);
  // TextSize => 1.5
  screen.setTextSize(1.5);
  // Don Luc Electronics
  screen.setCursor(0, 30);
  screen.println("Don Luc Electronics");
  // Tilt Switch
  screen.setCursor(0, 60);
  screen.println("Gravity: I2C SD2405 RTC");
  // Version
  screen.setCursor(0, 90);
  screen.println("Version");
  screen.setCursor(0, 120);
  screen.println( sver );
  // EEPROM
  screen.setCursor(0, 150);
  screen.println("EEPROM");
  screen.setCursor(0, 180);
  screen.println( uid );

}
// isDisplay HT
void isDisplayHT(){

  // DFRobot Display 320x480
  // Text Display
  // Text Wrap
  screen.setTextWrap(false);
  // Rotation
  screen.setRotation(3);
  // Fill Screen => white
  screen.fillScreen(0xffff);
  // Text Color => blue
  screen.setTextColor(0x001F);
  // Font => Free Sans Bold 12pt
  screen.setFont(&FreeSansBold12pt7b);
  // TextSize => 1.5
  screen.setTextSize(1.5);
  // RTC (Real-Time Clock)
  screen.setCursor(0, 30);
  screen.println("Gravity: I2C SD2405 RTC");
  // Flame Switch
  screen.setCursor(0, 70);
  screen.println( sF );
  // Humidity
  screen.setCursor(0, 110);
  screen.println("Humidity");
  screen.setCursor(0, 140);
  screen.print( h );
  screen.setCursor(65, 140);
  screen.println( "%RH" );
  // Temperature
  screen.setCursor(0, 190);
  screen.println("Temperature");
  screen.setCursor(0, 220);
  screen.print( t );
  screen.setCursor(65, 220);
  screen.println( "C" );
  // Date
  screen.setCursor(0, 260);
  screen.print( dateRTC );
  // Time
  screen.setCursor(0, 300);
  screen.print( timeRTC );

}

getEEPROM.ino

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

getFlame.ino

// Flame Sensor
// is Tilt
void isFlame(){

  // Flame
  // Check if Flame Sensor
  if(digitalRead( iFlame) == 0 ){   
    
    // Turn LED HIGH
    digitalWrite(iLEDG, HIGH);
    sF = "Fire Detected!!!";

    // iBuzzer On
    digitalWrite(iBuzzer, HIGH);

    // MicroSD Card
    isSD();

  } 
  else {
    
    // Turn LED LOW
    digitalWrite(iLEDG, LOW);
    sF = "No Fire Detected!!!";

    // iBuzzer Off
    digitalWrite(iBuzzer, LOW);
    
  }

}

getHT.ino

// AHT20 Humidity and Temperature Sensor
void isHT(){

  if(aht20.startMeasurementReady(true)){

    // Humidity
    h = aht20.getHumidity_RH();
  
   // Temperature
   t = aht20.getTemperature_C();
   }
  
}

getRTC.ino

// RTC (Real-Time Clock)
// is RTC (Real-Time Clock)
void isRTC(){

  // RTC (Real-Time Clock)
  rtc.read();
  
  // Date
  dateRTC = rtc.year; 
  dateRTC = dateRTC + "/";
  dateRTC = dateRTC + rtc.month;
  dateRTC = dateRTC + "/";
  dateRTC = dateRTC + rtc.day;
  
  // Time
  timeRTC = rtc.hour;
  timeRTC = timeRTC + ":";
  timeRTC = timeRTC + rtc.minute;
  timeRTC = timeRTC + ":";
  timeRTC = timeRTC + rtc.second;

}

getSD.ino

// MicroSD Card
// MicroSD Setup
void isSetupSD() {

    // MicroSD Card
    pinMode( chipSelect , OUTPUT );
    if(!SD.begin( chipSelect )){
        ;  
        return;
    }
    
    uint8_t cardType = SD.cardType();

    // CARD NONE
    if(cardType == CARD_NONE){
        ; 
        return;
    }

    // SD Card Type
    if(cardType == CARD_MMC){
        ; 
    } else if(cardType == CARD_SD){
        ; 
    } else if(cardType == CARD_SDHC){
        ; 
    } else {
        ; 
    } 

    // Size
    uint64_t cardSize = SD.cardSize() / (1024 * 1024);
 
}
// MicroSD Card
void isSD() {

  zzzzzz = "";

  //DLE|EEPROM Unique ID|Version|Flame|Date|Time|Humidity|Temperature|*\r
  zzzzzz = "DLE|" + uid + "|" + sver + "|" + String( sF ) + "|" 
  + String( dateRTC ) + "|" + String( timeRTC ) + "|" 
  + String( h ) + "|" + String( t ) + "|*\r";

  // msg + 1
  char msg[zzzzzz.length() + 1];

  zzzzzz.toCharArray(msg, zzzzzz.length() + 1);

  // Append File
  appendFile(SD, "/dledata.txt", msg );
  
}
// List Dir
void listDir(fs::FS &fs, const char * dirname, uint8_t levels){
    
    // List Dir
    dirname;
    
    File root = fs.open(dirname);
    
    if(!root){
        return;
    }
    
    if(!root.isDirectory()){
        return;
    }

    File file = root.openNextFile();
    
    while(file){
        if(file.isDirectory()){
            file.name();
            if(levels){
                listDir(fs, file.name(), levels -1);
            }
        } else {
            file.name();
            file.size();
        }
        file = root.openNextFile();
    }
    
}
// Write File
void writeFile(fs::FS &fs, const char * path, const char * message){
    
    // Write File
    path;
    
    File file = fs.open(path, FILE_WRITE);
    
    if(!file){
        return;
    }
    
    if(file.print(message)){
        ;  
    } else {
        ;  
    }
    
    file.close();
    
}
// Append File
void appendFile(fs::FS &fs, const char * path, const char * message){
    
    // Append File
    path;
    
    File file = fs.open(path, FILE_APPEND);
    
    if(!file){
        return;
    }
    
    if(file.print(message)){
        ;  
    } else {
        ;  
    }
    
    file.close();
    
}

setup.ino

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

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

  // Delay
  delay(100);

  // Wire
  Wire.begin();

  // Delay
  delay( 100 );
 
  // DFRobot Display 320x480
  screen.begin();

  // Delay
  delay( 100 );
  
  // Flame Sensor
  // LED Green 
  pinMode(iLEDG, OUTPUT);
  // Flame Sensor
  pinMode(iFlame, INPUT);

  // Delay
  delay( 100 );

  // AHT20 Humidity and Temperature Sensor
  aht20.begin();
  
  // Delay
  delay( 100 );

  // iBuzzer
  pinMode(iBuzzer, OUTPUT);

  // Delay
  delay(100);

  //MicroSD Card
  isSetupSD();

  // Delay
  delay(100);

  // RTC (Real-Time Clock)
  rtc.setup();

  // Set the RTC time automatically
  // Calibrate RTC time by your computer time
  rtc.adjustRtc(F(__DATE__), F(__TIME__));

  // Delay
  delay( 100 );

  // DFRobot Display 320x480 - UID
  // Don Luc Electronics
  // Version
  // EEPROM
  isDisplayUID();

  // Delay 5 Second
  delay( 5000 );

}

——

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

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

  • Programming Language
  • Single-Board 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

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.paquin8
Hackster: https://www.hackster.io/luc-paquin
LinkedIn: https://www.linkedin.com/in/jlucpaquin/

Don Luc

Project #15: Environment – Buzzer – Mk36

——

#DonLucElectronics #DonLuc #Buzzer #FlameSensor #AHT20 #FireBeetle2ESP32E #ESP32 #Display #IoT #Project #Fritzing #Programming #Electronics #Microcontrollers #Consultant

——

Buzzer

——

Buzzer

——

Buzzer

——

Crowtail – Buzzer 2.0

The buzzer module is for making sound in your project. It sounds when activated by a logic HIGH signal. Connect the buzzer to any of the D (digital) ports of you can easily make it sounds with setting the related ports to logic HIGH. The buzzer module can be also connected to an analog pluse-width modulation (PWM) output to generate various of tones.

DL2602Mk09

1 x DFRobot FireBeetle 2 ESP32-E
1 x Fermion: 3.5” 480×320 TFT LCD Capacitive
1 x GDL Line 10 CM
1 x Crowtail – Buzzer 2.0
1 x Gravity: AHT20 Temperature and Humidity Sensor
1 x Flame Sensor
1 x Crowtail – LED Green
1 x Gravity: IO Shield for FireBeetle 2
1 x Terminal Block Board for FireBeetle 2 ESP32-E IoT
1 x Lithium Ion Battery – 1000mAh
1 x USB 3.0 to Type-C Cable

DL2602Mk09p

DL2602Mk09p.ino

/****** Don Luc Electronics © ******
Software Version Information
Project #15: Environment - Buzzer - Mk36
15-36
DL2602Mk09p.ino
DL2602Mk09
1 x DFRobot FireBeetle 2 ESP32-E
1 x Fermion: 3.5” 480x320 TFT LCD Capacitive
1 x GDL Line 10 CM
1 x Crowtail - Buzzer 2.0
1 x Gravity: AHT20 Temperature and Humidity Sensor
1 x Flame Sensor
1 x Crowtail - LED Green
1 x Gravity: IO Shield for FireBeetle 2
1 x Terminal Block Board for FireBeetle 2 ESP32-E IoT
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"
// DFRobot Display GDL API
#include <DFRobot_GDL.h>
// AHT20 Humidity and Temperature Sensor
#include <DFRobot_AHT20.h>

// Buzzer
int iBuzzer = D10;

// AHT20 Humidity and Temperature Sensor
DFRobot_AHT20 aht20;
// AHT20 Humidity and Temperature Sensor
float h = 0;
float t = 0;

// Flame Sensor
// LED Green
int iLEDG = D11;
// Flame Sensor
int iFlame =  A0;
String sF = "";

// Defined ESP32
#define TFT_DC  D2
#define TFT_CS  D6
#define TFT_RST D3

/*dc=*/ /*cs=*/ /*rst=*/
// DFRobot Display 320x480
DFRobot_ILI9488_320x480_HW_SPI screen(TFT_DC, TFT_CS, TFT_RST);

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

// Software Version Information
String sver = "15-36";

void loop() {
  
  // AHT20 Humidity and Temperature Sensor
  isHT();
  
  // Flame Sensor
  isFlame();

  // isDisplay HT
  isDisplayHT();

  // Delay 0.1 Second
  delay( 100 );

}

getDisplay.ino

// DFRobot Display 320x480
// DFRobot Display 320x480 - UID
void isDisplayUID(){

  // DFRobot Display 320x480
  // Text Display
  // Text Wrap
  screen.setTextWrap(false);
  // Rotation
  screen.setRotation(3);
  // Fill Screen => black
  screen.fillScreen(0x0000);
  // Text Color => white
  screen.setTextColor(0xffff);
  // Font => Free Sans Bold 12pt
  screen.setFont(&FreeSansBold12pt7b);
  // TextSize => 1.5
  screen.setTextSize(1.5);
  // Don Luc Electronics
  screen.setCursor(0, 30);
  screen.println("Don Luc Electronics");
  // Tilt Switch
  screen.setCursor(0, 60);
  screen.println("Buzzer");
  // Version
  screen.setCursor(0, 90);
  screen.println("Version");
  screen.setCursor(0, 120);
  screen.println( sver );
  // EEPROM
  screen.setCursor(0, 150);
  screen.println("EEPROM");
  screen.setCursor(0, 180);
  screen.println( uid );

}
// isDisplay HT
void isDisplayHT(){

  // DFRobot Display 320x480
  // Text Display
  // Text Wrap
  screen.setTextWrap(false);
  // Rotation
  screen.setRotation(3);
  // Fill Screen => white
  screen.fillScreen(0xffff);
  // Text Color => blue
  screen.setTextColor(0x001F);
  // Font => Free Sans Bold 12pt
  screen.setFont(&FreeSansBold12pt7b);
  // TextSize => 1.5
  screen.setTextSize(1.5);
  // Tilt Switch
  screen.setCursor(0, 30);
  screen.println("Buzzer");
  screen.setCursor(0, 70);
  screen.println( sF );
  screen.setCursor(0, 120);
  screen.println("Humidity");
  screen.setCursor(0, 150);
  screen.print( h );
  screen.setCursor(65, 150);
  screen.println( "%RH" );
  screen.setCursor(0, 200);
  screen.println("Temperature");
  screen.setCursor(0, 230);
  screen.print( t );
  screen.setCursor(65, 230);
  screen.println( "C" );

}

getEEPROM.ino

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

getFlame.ino

// Flame Sensor
// is Tilt
void isFlame(){

  // Flame
  // Check if Flame Sensor
  if(digitalRead( iFlame) == 0 ){   
    
    // Turn LED HIGH
    digitalWrite(iLEDG, HIGH);
    sF = "Fire Detected!!!";

    // iBuzzer On
    digitalWrite(iBuzzer, HIGH);

  } 
  else {
    
    // Turn LED LOW
    digitalWrite(iLEDG, LOW);
    sF = "No Fire Detected!!!";

    // iBuzzer Off
    digitalWrite(iBuzzer, LOW);
    
  }

}

getHT.ino

// AHT20 Humidity and Temperature Sensor
void isHT(){

  if(aht20.startMeasurementReady(true)){

    // Humidity
    h = aht20.getHumidity_RH();
  
   // Temperature
   t = aht20.getTemperature_C();
   }
  
}

setup.ino

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

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

  // Delay
  delay( 100 );
 
  // DFRobot Display 320x480
  screen.begin();

  // Delay
  delay( 100 );
  
  // Flame Sensor
  // LED Green 
  pinMode(iLEDG, OUTPUT);
  // Flame Sensor
  pinMode(iFlame, INPUT);

  // Delay
  delay( 100 );

  // AHT20 Humidity and Temperature Sensor
  aht20.begin();
  
  // Delay
  delay( 100 );

  // iBuzzer
  pinMode(iBuzzer, OUTPUT);

  // Delay
  delay( 100 );

  // DFRobot Display 320x480 - UID
  // Don Luc Electronics
  // Version
  // EEPROM
  isDisplayUID();

  // Delay 5 Second
  delay( 5000 );

}

——

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

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

  • Programming Language
  • Single-Board 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

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.paquin8
Hackster: https://www.hackster.io/luc-paquin
LinkedIn: https://www.linkedin.com/in/jlucpaquin/

Don Luc

Project #28 – Sensors – Flame Sensor – Mk29

——

#DonLucElectronics #DonLuc #FlameSensor #FireBeetle2ESP32E #ESP32 #Display #IoT #Project #Fritzing #Programming #Electronics #Microcontrollers #Consultant

——

Flame Sensor
Flame Sensor

——

Flame Sensor
Flame Sensor

——

Flame Sensor
Flame Sensor

——

Flame Sensor

To prevent causalities or damages, it is necessary to detect the fire, so that warnings can be provided and even automatic fire suppression systems can be activated. There are multiple ways to detect a fire, like detecting temperature change, smoke detection, etc. In all of these, detecting temperature change would be more accurate, since some fires won’t even have detectable smoke. Even the temperature measurement is not too dependable since sometimes it’s too late when the change is detected. To overcome this, we can detect the thermal radiation instead of the temperature variation. The easiest and cheapest way to detect thermal radiation is to use a flame sensor.

DL2602Mk05

1 x DFRobot FireBeetle 2 ESP32-E
1 x Fermion: 3.5” 480×320 TFT LCD Capacitive
1 x GDL Line 10 CM
1 x Flame Sensor
1 x Crowtail – LED Green
1 x Gravity: IO Shield for FireBeetle 2
1 x Terminal Block Board for FireBeetle 2 ESP32-E IoT
1 x Lithium Ion Battery – 1000mAh
1 x USB 3.0 to Type-C Cable

DL2602Mk05p

DL2602Mk05p.ino

/****** Don Luc Electronics © ******
Software Version Information
Project #28 – Sensors – Flame Sensor– Mk28
28-29
DL2602Mk05p.ino
DL2602Mk05
1 x DFRobot FireBeetle 2 ESP32-E
1 x Fermion: 3.5” 480x320 TFT LCD Capacitive
1 x GDL Line 10 CM
1 x Flame Sensor
1 x Crowtail - LED Green
1 x Gravity: IO Shield for FireBeetle 2
1 x Terminal Block Board for FireBeetle 2 ESP32-E IoT
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"
// DFRobot Display GDL API
#include <DFRobot_GDL.h>

// Flame Sensor
// LED Green
int iLEDG = D11;
// Flame Sensor
int iFlame =  A0;
String sF = "";

// Defined ESP32
#define TFT_DC  D2
#define TFT_CS  D6
#define TFT_RST D3

/*dc=*/ /*cs=*/ /*rst=*/
// DFRobot Display 320x480
DFRobot_ILI9488_320x480_HW_SPI screen(TFT_DC, TFT_CS, TFT_RST);

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

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

void loop() {
  
  // Flame Sensor
  isFlame();

  // isDisplay Flame
  isDisplayFlame();

  // Delay 0.1 Second
  delay( 100 );

}

getDisplay.ino

// DFRobot Display 320x480
// DFRobot Display 320x480 - UID
void isDisplayUID(){

  // DFRobot Display 320x480
  // Text Display
  // Text Wrap
  screen.setTextWrap(false);
  // Rotation
  screen.setRotation(3);
  // Fill Screen => black
  screen.fillScreen(0x0000);
  // Text Color => white
  screen.setTextColor(0xffff);
  // Font => Free Sans Bold 12pt
  screen.setFont(&FreeSansBold12pt7b);
  // TextSize => 1.5
  screen.setTextSize(1.5);
  // Don Luc Electronics
  screen.setCursor(0, 30);
  screen.println("Don Luc Electronics");
  // Tilt Switch
  screen.setCursor(0, 60);
  screen.println("Flame Sensor");
  // Version
  screen.setCursor(0, 90);
  screen.println("Version");
  screen.setCursor(0, 120);
  screen.println( sver );
  // EEPROM
  screen.setCursor(0, 150);
  screen.println("EEPROM");
  screen.setCursor(0, 180);
  screen.println( uid );

}
// isDisplayFlame
void isDisplayFlame(){

  // DFRobot Display 320x480
  // Text Display
  // Text Wrap
  screen.setTextWrap(false);
  // Rotation
  screen.setRotation(3);
  // Fill Screen => white
  screen.fillScreen(0xffff);
  // Text Color => blue
  screen.setTextColor(0x001F);
  // Font => Free Sans Bold 12pt
  screen.setFont(&FreeSansBold12pt7b);
  // TextSize => 1.5
  screen.setTextSize(1.5);
  // Tilt Switch
  screen.setCursor(0, 30);
  screen.println("Flame Sensor");
  screen.setCursor(0, 90);
  screen.println( sF );

}

getEEPROM.ino

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

getFlame.ino

// Flame Sensor
// is Tilt
void isFlame(){

  // Flame
  // Check if Flame Sensor
  if(digitalRead( iFlame) == 0 ){   
    
    // Turn LED HIGH
    digitalWrite(iLEDG, HIGH);
    sF = "Fire Detected!!!";

  } 
  else {
    
    // Turn LED LOW
    digitalWrite(iLEDG, LOW);
    sF = "No Fire Detected!!!";
    
  }

}

setup.ino

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

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

  // Delay
  delay( 100 );
 
  // DFRobot Display 320x480
  screen.begin();

  // Delay
  delay( 100 );
  
  // Flame Sensor
  // LED Green 
  pinMode(iLEDG, OUTPUT);
  // Flame Sensor
  pinMode(iFlame, INPUT);

  // Delay
  delay( 100 );

  // DFRobot Display 320x480 - UID
  // Don Luc Electronics
  // Version
  // EEPROM
  isDisplayUID();

  // Delay 5 Second
  delay( 5000 );

}

——

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

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

  • Programming Language
  • Single-Board 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

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.paquin8
Hackster: https://www.hackster.io/luc-paquin
LinkedIn: https://www.linkedin.com/in/jlucpaquin/

Don Luc

Project #28 – Sensors – Water Sensor – Mk26

——

#DonLucElectronics #DonLuc #Water #FireBeetle2ESP32E #ESP32 #Display #IoT #Project #Fritzing #Programming #Electronics #Microcontrollers #Consultant

——

Water Sensor

——

Water Sensor

——

Water Sensor

——

Crowtail – Water Sensor 2.0

The water sensor detects the presence of water using a series of exposed, grounded traces, including the sensor traces. These traces have a weak pull-up resistance of 1 M?. This resistance will raise the value of the sensor trace until a drop of water causes a short circuit between the sensor trace and the grounded trace. The amount of water-induced contact between the grounded and sensor traces can be detected using the digital I/O pins.

DL2601Mk04

1 x DFRobot FireBeetle 2 ESP32-E
1 x Fermion: 3.5” 480×320 TFT LCD Capacitive
1 x GDL Line 10 CM
1 x Crowtail – Water Sensor 2.0
1 x Crowtail – LED Green
1 x Gravity: IO Shield for FireBeetle 2
1 x Terminal Block Board for FireBeetle 2 ESP32-E IoT
1 x Lithium Ion Battery – 1000mAh
1 x Micro USB Cable

DL2601Mk04p

DL2601Mk04p.ino

/****** Don Luc Electronics © ******
Software Version Information
Project #28 – Sensors – Water Sensor – Mk26
28-26
DL2601Mk04p.ino
DL2601Mk04
1 x DFRobot FireBeetle 2 ESP32-E
1 x Fermion: 3.5” 480x320 TFT LCD Capacitive
1 x GDL Line 10 CM
1 x Crowtail - Water Sensor 2.0
1 x Crowtail - LED Green
1 x Gravity: IO Shield for FireBeetle 2
1 x Terminal Block Board for FireBeetle 2 ESP32-E IoT
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>
// Arduino
#include "Arduino.h"
// DFRobot Display GDL API
#include <DFRobot_GDL.h>

// Water Sensor
// LED Green
int iLEDG = D11;
// Water
int iWater =  D10;
int iWaterState = 0;
String sW = "";

// Defined ESP32
#define TFT_DC  D2
#define TFT_CS  D6
#define TFT_RST D3

/*dc=*/ /*cs=*/ /*rst=*/
// DFRobot Display 320x480
DFRobot_ILI9488_320x480_HW_SPI screen(TFT_DC, TFT_CS, TFT_RST);

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

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

void loop() {
  
  // Water Sensor
  isWater();

  // isDisplay Water
  isDisplayWater();

  // Delay 1 Second
  delay( 1000 );

}

getDisplay.ino

// DFRobot Display 320x480
// DFRobot Display 320x480 - UID
void isDisplayUID(){

  // DFRobot Display 320x480
  // Text Display
  // Text Wrap
  screen.setTextWrap(false);
  // Rotation
  screen.setRotation(3);
  // Fill Screen => black
  screen.fillScreen(0x0000);
  // Text Color => white
  screen.setTextColor(0xffff);
  // Font => Free Sans Bold 12pt
  screen.setFont(&FreeSansBold12pt7b);
  // TextSize => 1.5
  screen.setTextSize(1.5);
  // Don Luc Electronics
  screen.setCursor(0, 30);
  screen.println("Don Luc Electronics");
  // SD
  screen.setCursor(0, 60);
  screen.println("Water Sensor");
  // Version
  screen.setCursor(0, 90);
  screen.println("Version");
  screen.setCursor(0, 120);
  screen.println( sver );
  // EEPROM
  screen.setCursor(0, 150);
  screen.println("EEPROM");
  screen.setCursor(0, 180);
  screen.println( uid );

}
// isDisplayWater
void isDisplayWater(){

  // DFRobot Display 320x480
  // Text Display
  // Text Wrap
  screen.setTextWrap(false);
  // Rotation
  screen.setRotation(3);
  // Fill Screen => white
  screen.fillScreen(0xffff);
  // Text Color => blue
  screen.setTextColor(0x001F);
  // Font => Free Sans Bold 12pt
  screen.setFont(&FreeSansBold12pt7b);
  // TextSize => 1.5
  screen.setTextSize(1.5);
  // Water Sensor
  screen.setCursor(0, 30);
  screen.println("Water Sensor");
  // Accelerometer X
  screen.setCursor(0, 60);
  screen.println( "Water State" );
  screen.setCursor(0, 90);
  screen.println( sW );

}

getEEPROM.ino

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

getWater.ino

// Water Sensor
// is Water
void isWater(){

// Read the State of the Water Sensor value:
  iWaterState = digitalRead(iWater);

  // check if rainning.
  // if it is, the waterState is LOW
  if (iWaterState == LOW) {     
    
    // Turn LED HIGH
    digitalWrite(iLEDG, HIGH);
    sW = "HIGH";

  } 
  else {
    
    // Turn LED LOW
    digitalWrite(iLEDG, LOW);
    sW = "LOW";
    
  }

}

setup.ino

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

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

  // Delay
  delay( 100 );
 
  // DFRobot Display 320x480
  screen.begin();

  // Delay
  delay( 100 );
  
  // Water Sensor
  // LED Green 
  pinMode(iLEDG, OUTPUT);
  // Water
  pinMode(iWater, INPUT);

  // Delay
  delay( 100 );

  // DFRobot Display 320x480 - UID
  // Don Luc Electronics
  // Version
  // EEPROM
  isDisplayUID();

  // Delay 5 Second
  delay( 5000 );

}

——

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

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

  • Programming Language
  • Single-Board 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

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.paquin8
Hackster: https://www.hackster.io/luc-paquin
LinkedIn: https://www.linkedin.com/in/jlucpaquin/

Don Luc