G1:Smart Pill Reminder System - shalan/CSCE4301-WiKi GitHub Wiki
RTOS-Based Medication Reminder System
Project Description
The system is built around a microcontroller running a Real-Time Operating System (RTOS), ensuring that timing-critical tasks such as scheduled reminders and Bluetooth command processing are handled with deterministic precision. Users or caregivers configure medication schedules wirelessly via a Bluetooth-connected interface, specifying pill times and associating each medication with a color-coded LED indicator. When a scheduled dose is due, the system triggers a buzzer alert and lights the corresponding LED to guide the patient to the correct pill — eliminating confusion in multi-medication scenarios. A SysTick-driven clock backbone guarantees that reminders fire accurately regardless of other system activity.
Project Objectives & Scope
- RTOS Integration: Deploy FreeRTOS with clearly separated tasks for: reminder scheduling, Bluetooth command handling, alert output (LED and buzzer) and logging.
- SysTick-Based Scheduling: Implement a SysTick interrupt-driven timekeeping backbone that accurately tracks time and triggers medication reminder events at user-defined intervals.
- Bluetooth Command Interface (UART): Accept and parse wireless commands over Bluetooth to allow users to: set or update pill reminder times, associate a reminder with a specific pill color, query the current schedule, retrieve the medication log.
- Color-Coded LED Alerts (GPIO): Upon a scheduled reminder firing, illuminate the LED color corresponding to the commanded pill color (e.g., Red LED -> red pill compartment), guiding the patient to the correct medication.
- Buzzer Notification (GPIO): Sound a buzzer alert alongside the LED when a reminder triggers, with the alert persisting until acknowledged or timing out after a configurable window.
- Multi-Medication Support: Support scheduling for at least 3 independent medications with distinct times and color mappings concurrently.
Stretch Goals
- Acknowledgement Button: Add a physical GPIO button the patient presses to confirm pill intake, updating the log with a confirmed-taken status and silencing the active alert.
- Missed Dose Escalation: Implement a secondary alert tier — if the patient does not acknowledge a reminder within a defined window (e.g., 5 minutes), the buzzer escalates (louder/faster pattern) and optionally re-alerts at a set interval.
- Companion Mobile Interface: Develop a minimal Android or cross-platform BLE app (or a serial terminal UI) to provide a friendlier interface for schedule configuration and log viewing beyond raw UART commands.