🏥 Medical Monitor
The Medical Monitor example demonstrates Artok's capability to render high-precision, real-time physiological waveforms (ECG, SpO2, Resp) alongside critical patient data.
In medical HMI design, latency and visual clarity are non-negotiable. This template shows how to maintain a consistent 60 FPS while updating multiple high-density charts simultaneously on embedded hardware.
🛠 Key Features
- High-Frequency Waveforms: Uses the Chart widget in "Circular" update mode to simulate a rolling ECG trace without memory fragmentation.
- Vital Sign Readouts: Employs large-format Labels with high-contrast colors (Green for Heart Rate, Yellow for SpO2) for visibility from a distance.
- Alarm System: A persistent top-bar status area that utilizes LED Indicators and flashing background styles to signal critical alerts.
- Touch-Lock Safety: Includes a dedicated "Lock" function via Logic and Events to prevent accidental settings changes during patient care.
🏗 Architecture
1. Data Streaming
In medical applications, data usually arrives via a high-speed Serial or SPI bus. This demo shows how to pipe that data through Lua to the UI thread efficiently without blocking the render loop.
2. Waveform Optimization
To ensure the waveforms look "analog" rather than "steppy," this example utilizes the Canvas widget for anti-aliased line drawing when the MCU has sufficient RAM, or optimized Line segments for lower-power targets.
🎨 Asset Optimization
- Custom Range Fonts: To save Flash, the Asset Packer is configured to only include numbers and specific medical symbols (e.g., bpm, %, mmHg) in the large vital-sign fonts.
- 16-bit Color Depth: Optimized for high-speed refreshes on internal MCU SRAM to minimize external bus latency.
- Alpha Masking: Used for the "trailing" effect on the ECG wave, giving it a professional phosphor-like fade that mimics traditional bedside monitors.
🚀 Try it Yourself
- Open Artok Studio.
- Select File > New From Template.
- Choose Medical Monitor (Standard Pro).
- Use the Live Simulator to toggle "Simulated Patient Data" and watch the waveform response.
While Artok provides the high-performance rendering engine required for medical displays, the final software must still undergo relevant medical device certification (e.g., FDA/CE) for clinical use.
🚀 Next Steps
- Chart — Deep dive into the widget configuration for rolling waveforms.
- Industrial Dashboard — See how to handle similar data in a factory context.
- Lua Scripting — Learn how to handle high-speed data buffers and timers.