View Single Post
Old 06-02-2015, 01:39 PM   #3
projek_01
Senior Member
 
projek_01's Avatar
 
Join Date: Oct 2012
Drives: 1996 ST204, Series 10 FR-S
Location: Calgary, Alberta
Posts: 253
Thanks: 89
Thanked 207 Times in 87 Posts
Mentioned: 20 Post(s)
Tagged: 0 Thread(s)
Found the following on the Arduino forum:

#define DIV 120
#define FPM 5280
#define TIRCIR 7.56
#define PPR 123.2
long TIME = 1000000;//time constant to divide freq
long vsspulse = pulseIn(vss, HIGH);
float vssval = (vsspulse / TIME);
float MPHpulse = ((1 / vssval)/ 2);
byte MPH = ((MPHpulse / FPM) * (TIRCIR / PPR) * DIV);


The issue is that the Arduino does not know what volume your head unit is already at so it would be annoying if you are already blasting your music going 20mph. Then you will be deaf by the time you hit 60mph
__________________
projek_01 is offline   Reply With Quote