Creating a track speedometer – Part 2 (Software)

Software Design


The functions are pretty straightforward.

  • Wait for a sensor to trip
  • Look for the opposing sensor to trip (while counting time)
  • Print the speed
  • Reset for next event
    • 5 seconds for the time being

Error Catch Situation

  • One sensor is tripped
    • Auto reset after 70 seconds (1 MPH)
    • It will report slowest possible speed

Basic Checkout of software

I manually pull a sensor line to GND at various intervals and got the responses captured below.

Testing with various speeds simulated
Testing with various speeds simulated

Leave a Reply