A C program to improve CO2 tolerance for sleep apnea using breath-hold exercises adapted from freediving CO2 tables.
Dylan petkus said it best:
| Demo | Description |
|---|---|
![]() |
Quick Overview - Why C02 tolerance matters |
![]() |
Concept - Introduction to the relaxed pause concept |
![]() |
CPAP and apnea - Why a CPAP affects breathing rate over time |
Cheers to Dylan for inspiring me to make this!
Get a complete development environment with full terminal access.
If there is no compiled binary you can
Compile it, run:
gcc -o apneaTraining apneaTraining.c
./apneaTraining
## Overview
This project provides a command-line tool to train CO2 tolerance, helping users breathe more steadily to reduce sleep apnea symptoms. It includes three training modes:
### Training Modes
Type A - Fixed Breath Hold, Decreasing Rest. Short session.
Type B - Increasing Breath Hold, Fixed Rest. Short session.
Type C - Fixed Breath Hold, Fixed Rest, Infinite Loop. Also known as tidal breathing. Can be as long as you want it.
The program measures a "Relaxed Pause" (breath-hold time after exhale) and saves it to `relaxedPauseData.txt` for progress tracking
## Screenshots


## Usage
### Running Binaries
Precompiled binaries are provided in the `bin` folder:
- Linux: `apnea_linux`
Download the appropriate binary and run:
- Linux:
```bash
chmod +x bin/apnea_linux
./bin/apnea_linux- Install GCC:
sudo apt-get install gcc
- Compile:
.../ApneaTraining$ gcc -Wall -std=c11 apneaTraining.c -o ./bin/apnea_linux
- Run:
./bin/apnea_linux
- Linux: GCC, Ubuntu linux has been tested. (Needed for
unistd.h,sleep)
- The program creates and reads from
relaxedPauseData.txtin the working directory. [todo: use ini file instead]
Audio effects: https://pixabay.com/sound-effects/ Newer versions will use a recording.


