Speedometer Project Update 01
More thinking, more plotting, more science since we last left off. I just discovered the AMAZING capabilities of Arduino’s pulseIn() function. I now have a new plan.
loop
do this 5 times
if the speed sensor is low
pulseIn HIGH the speed sensor pin
write that value to an array
else
pulseIn LOW the speed sensor pin
write that value to an array
average that array
calculate a speed from that average
write that speed to the display
write a timestamp to the memory card
write that value to the memory card
write throttle and brake position to the memory card
delay 10ms
