Mazurek-Biel describes cyclocross as a fast, technical sport with many turns and obstacles. She breaks cornering into assessing the turn and surface, choosing technique, and following a line that preserves speed and traction. She estimates using the technique around 100 times in a race.
Connecting React Native App with Garmin Smartwatch
Speaker
At React Native EU 2023, Callstack developer and competitive cyclist Małgorzata Mazurek-Biel explains how she connected a Garmin smartwatch to a React Native app to measure and analyze cycling cornering technique.
Inspired by bank-angle measurements in motorbikes and aircraft, Mazurek-Biel set out to measure how far her bike tilts through a turn. She chose a Garmin watch because a phone would be less convenient, its sensors may be less accurate, and it is less resistant to mud and water. She uses accelerometer readings to calculate the angle, with extra calculations to correct the mirrored raw value.
Garmin does not provide the direct Bluetooth connection she first expected. Instead, the watch sends messages through Garmin cloud services, which requires an internet connection and can introduce delays. On Android, Mazurek-Biel built a native module using Garmin’s library to find devices, track their status, connect to one, and pass incoming messages into JavaScript.
The React Native app uses hooks and event listeners to manage device status and incoming messages, which it saves to a local database. In testing, she mounted the watch on the handlebar and compared bank angle with speed on a chart, alongside a track view with values for selected locations. The goal is to spot turns where she can maintain more speed and track progress in training.
Mazurek-Biel says combining software development and cycling let her measure a part of performance she wanted to improve. She plans to use the app in technical training and analyze race laps to find where she can push harder and where she needs more practice. She says the code is available on GitHub.
Takeaways
- Start with a specific performance question; here, it was how cornering technique affects speed.
- Choose sensors and hardware for the conditions where the product will be used, including exposure to mud and water.
- Check device vendor communication constraints early: Garmin messaging depends on internet access and can add latency.
- A native module can bridge a vendor Android library into React Native when a ready-made integration is unavailable.
- Pair sensor measurements with context such as location and speed so recorded data can guide practical training.
Mentioned in this talk
Search inside this talk
What was claimed 7
- built
“I thought I could perhaps create an application for my smartwatch.”
YouTube Unverified1 source· Talk
- uses
“All I needed was to use the accelerometer in my application.”
YouTube Unverified1 source· Talk
- featureGarmin smartwatch: Transmits sensor data to the phone via messages routed through Garmin cloud services
“Garmin sends messages through its cloud services.”
YouTube Unverified1 source· Talk
- built
“I decided to use my skills and prepare the native module myself.”
YouTube Unverified1 source· Talk
- uses
“Sending messages requires importing the Garmin Communications package.”
YouTube Unverified1 source· Talk
- integrates withAndroid native module integrates with Garmin Connect
“My native module leverages the Garmin Connect library.”
YouTube Unverified1 source· Talk
- integrates withReact Native integrates with Android native module
“The React Native application uses a native module to let the user connect to the device.”
YouTube Unverified1 source· Talk













