Chapter 9

Bike Ride Recorder

WHAT’S IN THIS CHAPTER?

  • Understanding bike computers
  • A look at the Design Brief
  • Understanding the Arduino side
  • Constructing the Android app

Bike computers tell you about your performance when you are racing on the road. They store information about the speed of your wheels, the distance of your trip, or the time you have been riding. Bike computers are available that connect to your phone and enable you to log your performance to later compare it with other trips via graphs.

The project in this chapter brings you a little further into making your own bike computer using your Android device and a little help from embedded electronics. We think it is interesting to compare the turn of the wheel with the turn of the pedals. If you are racing downhill, the amount of effort you make on the bike is much less than when you are on a flat road. You can measure that effort by comparing the data of two identical sensors: one on a wheel and one on a pedal.

This is a challenging project for which you are going to make use of low-level code on the Arduino side (in the form of hardware interrupts) and represent data on top of video on the Android side. Because we don’t want you to run any kind of risk by taking your attention away from riding, the app will record your trip in a video file that you can play back later. At the end of this project, you will have a video recording of your races with information about your speed as well as a representation of your real ...

Get Professional Android Open Accessory Programming with Arduino now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.