Reading Heart Rate (bpm), Systolic/Diastolic Blood Pressure (mmHg) and SpO2 Blood Oxygen (%) from BLE smart watches in Python.
Live plot of real-time HR readings using gnuplot.
Tested on a laptop running Ubuntu 18.04.2 LTS and a Rapberry Pi 3 B+ running Raspbian.
I personally used the following two watches as a starting point, but the code can be adapted to most BLE devices with the same features after you identify the handles in which to enable notifications and activate the particular sensor.
sudo apt-get -y install bluez gnuplot
sudo pip install pexpect
git clone https://github.com/drrobotk/BLEHEALTH
cd BLEHEALTH
sudo chmod +x liveplot.sh
sudo chmod +x health.sh
Display health stats:
./health.sh w
Display HR live plot:
./liveplot.sh w
where w (=1,2) is the watch number.
You will need 2 bluetooth dongles to run the code with two BLE watches concurrently.