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)
β
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.
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.
- 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 documentationRaspberry Pi with Linux C++ compiler (CMake) lgpiod (for GPIO control) ADS1015/ADS1115 ADC module L298N Motor Driver
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)(Add images or GIFs showing the system in action!)
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 |
Contributions are welcome! Please open an issue or submit a pull request.
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.
π§ Email: intellifire2025@outlook.com πΌ Instagram: @intellifire25 π Github: [https://github.com/IntelliFire-UofG/]
C++ Raspberry Pi Event-Driven Programming Real-Time Systems Flame Sensor Motor Control Embedded Systems