/radmesserS

Primary LanguageCGNU Lesser General Public License v3.0LGPL-3.0

ESP32 BLE Distance Measurements

Distance Measurement HC-SR04 sensors connected to ESP32 pretending to be heart rate sensor for logging with fitness apps.

Description

Inspired by the Berlin project Radmesser, this version connects to tracking apps by pretending to be a heart rate sensor. This enables you to write the distance to a gpx file and use it later in video editing software like Dashware or Garmin Virb Edit to show the distance in your video.

More information can be found in the project wiki, see here.

Getting Started

Hardware

The prototype by Zweirat used the following:

With LiFePo Batteries you can power the device directly and avoid step-up/step-down losses that you have when using a powerbank. On the other hand you need the HC-SR04P instead of the HC-SR04 sensor if you don't have 5V power supply.

Dependencies

Installing

  • clone or download repository
  • open in Arduino IDE
  • compile and upload to ESP32
  • Connect sensor

Executing program

  • power up device
  • Use BLE Scanner or your favorite BLE app to send ond permanently save offset (for example the distance from sensor to handlebar)
  • Start your favourite tracking app Good results were made with RunnerUp, Strava had some issues on Android, look here for alternatives, no experience with iOS so far.
  • Connect heart rate sensor

ToDo

  • Write nice tutorial how to process video data and create synchronized overlays
  • Develop an own app to record videos in loop mode and only save short clips when distance is low. At the end of the ride, ask user to confirm that a car was overtaking. Possibility to create overlays for video and report anonymous metadata of overtaking incidents (good and bad ones) to open data platform.

Acknowledgments

Inspiration, code snippets, etc.