Skip to content

chas-challenge-code-6/hardware-esp32

Repository files navigation

Sentinel ESP32 Hardware Firmware

This repository contains the firmware and hardware documentation for the Sentinel project, based on LilyGO ESP32-S3 and compatible boards. The system is designed for sensor data acquisition, wireless communication, and remote monitoring in challenging environments.

Features

  • Multi-sensor support:
    • Accelerometer (MPU9250/MPU6500) - Fall detection, steps counting
    • Temperature & Humidity (DHT22)
    • Gas detection (MQ2)
    • Battery monitoring
    • Heart rate monitoring (Polar H9 via Bluetooth)
  • Wireless communication:
    • WiFi with automatic LTE fallback - Seamlessly switches to LTE when WiFi is unavailable
    • LTE/4G (TinyGSM)
    • Bluetooth Low Energy (NimBLE)
    • GPS (TinyGPSPlus)
  • Modular FreeRTOS tasks for sensor reading, communication, and processing
  • 3D-printable case design (see Prototype-design/Case-design/Format-for-3D-printing/)
  • PlatformIO project for easy build and deployment

Hardware Requirements

  • LilyGO T-SIM7670G S3 or T-A7670 (ESP32-S3/ESP32)
  • DHT22 sensor
  • MQ2 gas sensor
  • MPU9250/MPU6500 accelerometer
  • LiPo battery (with voltage divider for monitoring)
  • Optional: Polar H9 heart rate strap (Bluetooth)

See LilyGO T-A76XX repo and include/utilities.h for supported board variants and pinouts.

Software Dependencies

  • PlatformIO
  • Arduino framework
  • Libraries (see platformio.ini):
    • DHT sensor library
    • MQUnifiedsensor
    • NimBLE-Arduino
    • MPU9250_WE
    • TinyGSM (in lib/)
    • TinyGPSPlus (in lib/)

Getting Started

  1. Clone this repository

  2. Install PlatformIO (VSCode extension or CLI)

  3. Connect your ESP32 board

  4. Configure board and secrets:

    • Edit platformio.ini to select your board/environment
    • Copy include/secrets.h.default to include/secrets.h and configure your network credentials
    • Review include/config.h for additional system configuration options
  5. Build and upload:

    pio run -t upload
  6. Monitor serial output:

    pio device monitor

Directory Structure

  • src/ - Main application source code (tasks, sensors, network)
  • include/ - Header files and configuration
  • lib/ - External libraries (TinyGSM, TinyGPSPlus)
  • Prototype-design/Case-design/Format-for-3D-printing/ - 3D-printable case files (STL)
  • docs/ - Documentation, diagrams, and pinouts
  • scripts/ - API developing scripts

Documentation & Resources

Project

For our hardware

License

This project is licensed under the MIT License. See LICENSE for details.

About

Sentinel Hardware Firmware

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 5

Languages