Timer is better. Kepp timer running and make it interrupt every 1 sec. get reading of velocity into a variable and calculate acceleration in a function. Initially let us assume velocity is constant so Vf - Vi = 0 so accln = 0. now use another variable to hold previous value of velocity. If speed changes then take the diff of velocities and calculate accln.
where are you calculating aacln? What is the use of eeprom? there is 40 ms delay in eeprom code. It will hinder the accln calculation process. You will get wrong values with delays in your code.
acceleration means, bike taken time to go 0 km/h to 60 km/h in seconds, that i calculated at last,
first 0km/h time value to eeprom & 60 km/h time value to eeprom,
when i want to show values : read from eeprom transformed hex to int, and converted minutes to seconds,
then subtracted 60Km/h time value with 0 kmp/h time :
eg: 0-1kmph transition on 7hr:30min:41sec
& 60 on 7hr:31min:55sec
i did : (30*60)+41 say 1841
and (31*60)+55 say 1915
yahh,, difference of initial & final time is the thing i did before (in program). i gave 30 seconds delay(in simulation) from 0-60 but showing random values like 190,228,,,,