Bikers understand the importance of changing the chain every 2,500 km and the cassette every 5,000 km to avoid bigger expenses down the road. To help with this, I’ve developed a bike sensor that pulls gear-ridden distance data from Strava. I’m looking to create an additional feature that tracks the remaining distance until the chain needs to be replaced. For example, if I changed the chain at 14,300 km, the next change should occur at 16,800 km.
An example. After completing an 80 km ride, Strava would update the gear-ridden distance to 14,380 km. The new ‘chain remaining distance’ should automatically adjust to 2,420 km (2,500 km - 80 km).
Is there anyone who can help me achieve this functionality?