raspberry pi based trachsense hub for monitoring respiratory health.
you will need git, python >= 3.9, and uv installed.
-
install system dependencies: these are required to build numeric and bluetooth packages on 32-bit arm.
sudo apt-get update sudo apt-get install -y libatlas-base-dev libopenblas-dev libdbus-1-dev build-essential libffi-dev libssl-dev
-
clone and sync:
git clone https://github.com/TrachSenseADC/trachhub.git cd trachhub uv sync -
database setup: the
setup.shscript handles the full installation of postgresql 13 and timescaledb. for a manual install, refer to the script logic.
for a fully automated installation on a fresh pi:
curl -sSL https://raw.githubusercontent.com/TrachSenseADC/trachhub/main/setup.sh | bashif already configured, simply run:
cd trachhub
uv run app.pyto enable the internal virtual emulator for developer testing:
uv run app.py --debugif you encounter issues with architecture compatibility on the pi, try a clean sync:
rm -rf .venv
uv sync --no-cacheonce the app runs, it will print the local server URL. open that in your browser.
- skip wifi: you can choose to skip the wifi setup and move directly to trachsense connection.
- connect: find "trachsense" in the list of bluetooth devices (use ctrl+f if needed).
- data stream: you might see a visual error message saying "failed to connect"—you can ignore this for now if values start printing in the terminal.
- visualization: once connected, you will see live values and a real-time plot.
readings are stored in diff.csv. if the server fails to write this file on a pi, you can use the bt_check.py script as a fallback to verify hardware communication.
to see a complete stationary graph of your recorded data:
uv run plot.pyif you still encounter issues, please let Yashas (ybhat@umd.edu) know.