I don’t know if you are like me, but for some activities, contemplating his/her own progresses is a very good motivation for continuing. If the best way to measure progress is certainly to achieve more and more quality (in result), second best way is to achieve more and more quantity (of training).
If this is probably true for piano lesson (I guess), this is certainly true for running. For example when preparing for running a marathon, it is well known that one needs to go into a 3 months-preparation, with weekly routines and many kilometers of running. At the end of the day, the rewarding is to finish the marathon in a decent time, or at least to finish it. But before actually running the marathon, at least I find a motivation in observing how many kilometers I have ran during my preparation, how many training sessions I had during the week, etc.
All this lengthly introduction to explain why I bothered developing yesterday another small-but-fun project around a Raspberry Pi Zero : a Strava tracker! For those who don’t know, Strava is an application quite popular among runners to track (and share) running activities.
So I decided to build a small system for tracking my sessions on Strava, and display it nicely to show (to me) how much I ran and how many times. Totally useless, true, but fun (at least for me).
When it comes to displaying information with a Raspberry, you have two ways of doing it: either it is a fast moving information (e.g., a video) and you use a led display, or it is a slow moving information (e.g., daily forecast) and you use… e-paper display!
Strava tracking is definitely slow moving, so I used an e-paper display together with a Raspberry Pi Zero. The idea is to put the system somewhere on a shelf that I can observe everyday, and have the information, good or bad, updated daily (since I run at most one session per day).
Using a Pi with an e-paper screen is something I am familiar with (as I have developed many other projects with such a screen, for example a fridge magnet) — although watch out: it seems that latest version of PiOS (version of March 2021) is not compatible with Pimoroni’s inky-Phat library, so I had to use an older version of the OS.
Retrieving data from Strava, even if it is MY data, requires some understanding of oauth, but there are some tutorials, e.g., Raspberry Pi Strava — although beware that the process has slightly changed to reinforce security via a token to be renewed every 6 hours.
At the end of the day, in spite of the two hiccups mentioned above (inkyphat incompatibility with latest version of PiOS, Strava changing to oauth v 2.0), I managed to get it to work. And I am quite pleased by the result!
Will it work and boost my running motivation? We will see. Next Marathon is in October. Meanwhile, my small motivator is installed on my shelf…