Automatic gear shifting using cadence sensor output