bicycle_odometer

changeset 3:c0c68988bcdf

changed the wheel perimeter
author John Tsiombikas <nuclear@member.fsf.org>
date Thu, 25 Aug 2011 08:22:19 +0300
parents f74f4561e71c
children f883847a0591
files odometer.c
diffstat 1 files changed, 6 insertions(+), 3 deletions(-) [+]
line diff
     1.1 --- a/odometer.c	Wed Aug 24 07:51:12 2011 +0300
     1.2 +++ b/odometer.c	Thu Aug 25 08:22:19 2011 +0300
     1.3 @@ -22,6 +22,7 @@
     1.4  #include <avr/power.h>
     1.5  #include <util/delay.h>
     1.6  
     1.7 +
     1.8  #define SEC_TICKS	(F_CPU / 256 / 256)
     1.9  
    1.10  #define PRESCL_1		1
    1.11 @@ -39,8 +40,13 @@
    1.12  
    1.13  #define DEBOUNCE_TICKS	1
    1.14  
    1.15 +
    1.16 +/* wheel perimeter in centimeters */
    1.17 +#define WHEEL_PERIMETER		194
    1.18 +
    1.19  #define nop()	asm volatile("nop")
    1.20  
    1.21 +
    1.22  void init_timer(void);
    1.23  void latch(int n);
    1.24  void update_display(void);
    1.25 @@ -56,9 +62,6 @@
    1.26  unsigned long nrot;
    1.27  unsigned long speed_rps;
    1.28  
    1.29 -/* wheel perimeter in centimeters */
    1.30 -#define WHEEL_PERIMETER		220
    1.31 -
    1.32  int main(void)
    1.33  {
    1.34  	int i;