https://github.com/koenvervloesem/m5core2-heart-rate-display
Show the heart rate sent by a Bluetooth Low Energy heart rate sensor on the display of an M5Stack Core2
https://github.com/koenvervloesem/m5core2-heart-rate-display
ble bluetooth-arduino bluetooth-low-energy core2ez esp32 esp32-arduino heart-rate heart-rate-monitor heart-rate-sensor m5stack m5stack-core2 nimble-arduino-library
Last synced: about 2 months ago
JSON representation
Show the heart rate sent by a Bluetooth Low Energy heart rate sensor on the display of an M5Stack Core2
- Host: GitHub
- URL: https://github.com/koenvervloesem/m5core2-heart-rate-display
- Owner: koenvervloesem
- License: mit
- Created: 2021-01-04T20:51:24.000Z (over 4 years ago)
- Default Branch: main
- Last Pushed: 2022-06-10T13:54:41.000Z (almost 3 years ago)
- Last Synced: 2025-02-26T15:08:16.231Z (2 months ago)
- Topics: ble, bluetooth-arduino, bluetooth-low-energy, core2ez, esp32, esp32-arduino, heart-rate, heart-rate-monitor, heart-rate-sensor, m5stack, m5stack-core2, nimble-arduino-library
- Language: C++
- Homepage:
- Size: 534 KB
- Stars: 12
- Watchers: 3
- Forks: 3
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# M5Core2 Heart Rate Display
[](https://github.com/koenvervloesem/M5Core2-Heart-Rate-Display/actions)
[](https://github.com/koenvervloesem/M5Core2-Heart-Rate-Display/blob/main/LICENSE)This Arduino sketch shows the heart rate sent by a Bluetooth Low Energy heart rate sensor on the display of an [M5Stack Core 2](https://m5stack.com/products/m5stack-core2-esp32-iot-development-kit).
This is a proof of concept with basic functionality. It supports any heart rate sensor that implements the Heart Rate Measurement characteristic of Bluetooth Low Energy.

## Requirements
* Prepare your [Arduino IDE for the M5Stack Core2](https://docs.m5stack.com/#/en/arduino/arduino_core2_development).
* Install the [Core2ez](https://github.com/M5ez/Core2ez) library as a ZIP file.
* Install the [M5Core2](https://github.com/m5stack/M5Core2) and [NimBLE-Arduino](https://github.com/h2zero/NimBLE-Arduino) libraries from the library manager.## Building with arduino-cli
There's a Makefile to ease the installation of the platform and libraries if you are using [arduino-cli](https://github.com/arduino/arduino-cli):```console
make platform
make libraries
```Then you can build the sketch:
```console
make build
```After this, you can upload the binary firmware file to your M5Stack Core2:
```console
arduino-cli upload -p /dev/ttyUSB0 -b m5stack:esp32:m5stack-core2 -i $PWD/build/M5Core2-Heart-Rate-Display.ino.bin
```## TODO
* Improve the user interface.
* Let the user choose the heart rate sensor to connect with.
* Send heart rate measurements to MQTT for further processing and visualization.## Learn more about Bluetooth Low Energy development
If you want to learn more about Bluetooth Low Energy development, read my book [Develop your own Bluetooth Low Energy Applications for Raspberry Pi, ESP32 and nRF52 with Python, Arduino and Zephyr](https://koen.vervloesem.eu/books/develop-your-own-bluetooth-low-energy-applications/) and the accompanying GitHub repository [koenvervloesem/bluetooth-low-energy-applications](https://github.com/koenvervloesem/bluetooth-low-energy-applications).
## License
This project is provided by [Koen Vervloesem](mailto:[email protected]) as open source software with the MIT license. See the [LICENSE](LICENSE) file for more information.
The source code is based on h2zero's [NimBLE_Client.ino](https://github.com/h2zero/NimBLE-Arduino/blob/master/examples/NimBLE_Client/NimBLE_Client.ino) example from the NimBLE-Arduino library.