Skip to content

EngGabriellaPimentel/sensor-logger-c

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

6 Commits
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

โš™๏ธ Industrial IoT Sensor Firmware Simulation

C Embedded Systems IoT

๐Ÿ“‹ Executive Summary

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).


๐Ÿ—๏ธ Technical Architecture

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 MachineState to 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.

๐Ÿ’ป Key Features

  • ๐Ÿš€ 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.

โš™๏ธ How to Compile & Run

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

About

Interactive Industrial DAQ Firmware simulation in C with real-time CLI dashboard and edge logic.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages