Skip to content

Feature/phase4 dynamic sampling#4

Merged
karangandhi-projects merged 5 commits intomainfrom
feature/phase4-dynamic-sampling
Dec 2, 2025
Merged

Feature/phase4 dynamic sampling#4
karangandhi-projects merged 5 commits intomainfrom
feature/phase4-dynamic-sampling

Conversation

@karangandhi-projects
Copy link
Copy Markdown
Owner

📌 Phase 4 – Dynamic Sensor Sampling Based on Power Mode

This PR implements dynamic, power-aware sensor sampling across the entire STM32 Smart Sensor Hub system. Sensor sampling intervals now automatically adjust depending on the current PowerMode_t (ACTIVE / IDLE / SLEEP / STOP), significantly reducing energy usage and making the hub behave like a real-world smart IoT node.

✅ Key Features Added

Sensor sampling interval now selected from:

#define SENSOR_PERIOD_ACTIVE_MS (1000U)
#define SENSOR_PERIOD_IDLE_MS (5000U)
#define SENSOR_PERIOD_SLEEP_MS (30000U)
#define SENSOR_PERIOD_STOP_MS (0U) // sampling disabled

STOP mode explicitly disables sampling (0 ms).

Task scheduling updated to compute sampling period dynamically.

CLI status command now reports:

Current power mode

Current sampling interval

CLI pmode <0|1|2|3> updates sampling in real time.

Docs fully updated to reflect Phase 4 behavior.

🧪 Testing Performed

Verified ACTIVE → IDLE → SLEEP → STOP transitions.

Confirmed sampling stops in STOP.

Confirmed sampling resumes when transitioning out of STOP.

Verified CLI overrides and live sampling updates.

Logged timestamps confirm dynamic period changes.

📁 Updated Docs

README.md (root level)

docs/ARCHITECTURE.md

docs/CLI_COMMANDS.md

docs/RELEASE_NOTES.md (v0.4.0 added)

docs/README.md

📦 Version

v0.4.0

@karangandhi-projects karangandhi-projects merged commit be03c75 into main Dec 2, 2025
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant