This project simulates the low-level firmware of an Industrial Data Acquisition System (DAQ). Written in pure C, it mimics the behavior of edge devices attached to rotating machinery, generating high-frequency telemetry data (Temperature & Vibration) and performing real-time health checks.
This is the Layer 1 (Hardware) of my End-to-End Data Portfolio. The data generated here acts as the input for my Digital Twin AI Project (Python).
Unlike high-level scripts, this C program focuses on memory efficiency and execution speed, simulating constraints typical of microcontrollers.
- Core Function:
run_daq_process() - Data Structure: Uses
struct MachineStateto organize volatile sensor data in memory. - Edge Computing: Implements a local diagnosis algorithm (
diagnose_state) to flag critical failures before data transmission, reducing cloud latency.
- ๐ High Performance: Generates synthetic telemetry streams with negligible overhead.
- ๐พ File I/O Management: Buffers and writes structured data to
sensor_data.csv(CSV format). - ๐ฅ๏ธ CLI Dashboard: Includes a formatted command-line interface table for on-site debugging.
โ ๏ธ Anomaly Injection: Probabilistically injects "Critical Failure" states to test downstream AI models.
This project is cross-platform (Windows/Linux/macOS).
Prerequisites: A standard C compiler (GCC/Clang/MinGW).
# 1. Compile the firmware
gcc main.c -o sensor_firmware
# 2. Run the simulation
# (Follow the interactive prompts to set Machine ID and Sampling Rate)
./sensor_firmware