The main task of this thesis is to design a proper algorithm to calculate and estimate the angle a bicycle peddle has revolved in a circular motion when a motor is equipped with a G-sensor and is mounted on the bicycle peddle. Two algorithms have been designed, one of the algorithms calculates the slope of the measured data and form this slope to determine and estimate the angle while in the other algorithm it compares the location of the data with the locations of the maximum and minimum values of the measured data to estimate its possible revolving angle. These two algorithms are applied to many sets of measurement data to determine the angle associated with each measured data, the accuracy, advantages and performance of each algorithm are compared and it concludes that the second algorithm with data location comparison has better performance.