Skip to content

IntelliFire-UofG/IntelliFireCore

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Welcome to IntelliFire UofG Core Repository

πŸš’ Autonomous Fire Truck Control System πŸ”₯

Real-Time Fire Detection & Response System for Raspberry Pi

Fire Truck
C++
Raspberry Pi
License

πŸ“Œ Project Description

The Autonomous Fire Truck Control System is an embedded real-time application designed for fire detection and autonomous movement. Running on a Raspberry Pi with Linux, this system utilizes an event-driven architecture to detect flames via LM393 flame sensors (connected through an ADS1015/ADS1115 ADC) and control four motors via an L298N motor driver.

Important

Please refer to Introduction Documentation if any doubts about functionalities.

Please refer to STL Files if you wish to 3D print the chassis.

Please refer to Testing README.md if you wish to review our QA process and some unitTesting tools done with code (Not automated).

Please refer to our Wiki Page to recap all the retrospectives from our ART (Agile Release Train)

Please refer to our Project Page to recap all the User Stories from our ART (Agile Release Train)

πŸ”₯ Main Features:

βœ… Event-driven architecture (using threads, callbacks, and interrupts).
βœ… Motor control for movement based on flame detection.
βœ… Real-time sensor data processing using an ADC.
βœ… Graphical display for real-time flame visualization.
βœ… Interrupt-based button control for manual intervention.
βœ… Unit testing for maintainability.


πŸš€ How It Works

1️⃣ System Initialization β†’ Motors, sensors, buttons, and display are initialized.
2️⃣ Register Callbacks β†’ Sensor readings & button presses trigger motor actions.
3️⃣ Start Event Loop β†’ The system continuously monitors inputs & executes in real time.
4️⃣ Fire Detection β†’ The truck stops moving and logs fire locations.
5️⃣ User Interaction β†’ Buttons allow manual movement control when necessary.


πŸ›  Tech Stack

  • Programming Language: C++
  • Platform: Raspberry Pi (Linux)
  • Architecture: Object-Oriented Programming (OOP)
  • Event Handling: Threads, Callbacks, Interrupts
  • Visualization: Qt5
  • Testing: Unit testing framework

πŸ“‚ IntelliFireCore
 β”œβ”€β”€ πŸ“‚ include                # Header files (Interface definitions)
 β”‚   β”œβ”€β”€ ads1115rpi.h          # ADS1115 class definition
 β”‚   β”œβ”€β”€ basicMotion.h         # Motor control class definition
 β”‚   β”œβ”€β”€ eventLoop.h           # Event loop handling
 β”‚   β”œβ”€β”€ fireDetector.h        # Event handler for detecting fire
 β”‚   β”œβ”€β”€ IRSensor.h            # IR sensor class definition
 β”‚   β”œβ”€β”€ LN298MotorControl.h   # Motor control class definition
 β”‚   β”œβ”€β”€ pumpControl.h         # Fire extinguishing pump control
 β”‚   β”œβ”€β”€ UltraSonicSensor.h    # Ultrasonic sensor class definition
 β”‚
 β”œβ”€β”€ πŸ“‚ src                    # Implementation files
 β”‚   β”œβ”€β”€ πŸ“‚ IntelliFireUI      # Graphical UI visualization for sensor data
 β”‚   β”œβ”€β”€ ads1115manager.cpp    # ADS1115 manager implementation
 β”‚   β”œβ”€β”€ ads1115rpi.cpp        # ADS1115 implementation
 β”‚   β”œβ”€β”€ basicMotion.cpp       # Basic motion control implementation
 β”‚   β”œβ”€β”€ eventLoop.cpp         # Event loop implementation
 β”‚   β”œβ”€β”€ fireDetector.cpp      # Fire detector implementation
 β”‚   β”œβ”€β”€ IRSensor.cpp          # IR sensor implementation
 β”‚   β”œβ”€β”€ keyLogger.cpp         # Key logger implementation
 β”‚   β”œβ”€β”€ libcam2opencv.cpp     # Camera to OpenCV implementation
 β”‚   β”œβ”€β”€ LN298MotorControl.cpp # Motor control implementation
 β”‚   β”œβ”€β”€ main.cpp              # Main entry point, event-driven execution
 β”‚   β”œβ”€β”€ mainwindow.cpp        # Main window implementation
 β”‚   β”œβ”€β”€ pumpControl.cpp       # Pump activation logic
 β”‚   β”œβ”€β”€ sensorContainer.cpp   # Sensor container implementation
 β”‚   β”œβ”€β”€ UltraSonicSensor.cpp  # Ultrasonic sensor implementation
 β”‚
 β”œβ”€β”€ CMakeLists.txt            # CMake build configuration
 β”œβ”€β”€ CODE_REVISION_GUIDELINES.md  # Internal development guidelines
 β”œβ”€β”€ IntelliFireLogo.png       # Project logo
 β”œβ”€β”€ LICENSE                   # Apache v2.0 License
 β”œβ”€β”€ README.md                 # Project documentation

🚦 Installation & Setup

1️⃣ Prerequisites

Raspberry Pi with Linux C++ compiler (CMake) lgpiod (for GPIO control) ADS1015/ADS1115 ADC module L298N Motor Driver

2️⃣ Build & Run

ssh -X -C your_rpi_username@your_rpi_hostname

sudo apt update
sudo apt install -y build-essential cmake git pkg-config
sudo apt install -y qtbase5-dev qttools5-dev qttools5-dev-tools
sudo apt install -y libgpiod-dev
sudo apt install -y libcurl4-openssl-dev
sudo apt install -y libqwt-qt5-dev

# Clone the repository
git clone [https://github.com/IntelliFire-UofG/IntelliFireCore.git]

# Navigate to project directory
cd IntelliFireCore

# Create a build folder
mkdir build && cd build

# Compile the project with CMake and Make
cmake ..
make

# Run the executable
./IntelliFireUI (on Raspberry Pi via SSH)

./mediamtx_http_scanner (on local machine)

πŸ“Έ Demo & Screenshots

(Add images or GIFs showing the system in action!)


πŸ“Ÿ RPi GPIOs Table

Important

Make sure of connecting the following properly, if not ask the team through our different channels.

IntelliFire Feature # GPIO
Left Motor PWM 12
Left Motor FWD 17
Left Motor BWD 27
Right Motor PWM 13
Right Motor FWD 23
Right Motor BWD 22
ADS1115 Data R. 5
ADS1115 I2C SDA 2
ADS1115 I2C SCL 3
L393M Flame 1 9
L393M Flame 2 10
Pump 11
Ultrasonic Echo 24
Ultrasonic Trig 25
IR Presence 16

🀝 Contributing

Contributions are welcome! Please open an issue or submit a pull request.

πŸ“œ License

This project is licensed under the Apache License 2.0. You can freely use, modify, and distribute it, but you must provide attribution. See the LICENSE file for details.

πŸ“ž Contact & Social Media

πŸ“§ Email: intellifire2025@outlook.com πŸ’Ό Instagram: @intellifire25 🌎 Github: [https://github.com/IntelliFire-UofG/]

🏷️ Tags

C++ Raspberry Pi Event-Driven Programming Real-Time Systems Flame Sensor Motor Control Embedded Systems

πŸ”₯πŸš’ Built with passion & innovation! πŸš’πŸ”₯