Speedometer not displaying values.

Have you tried declaring the variables volatile?