Changes

Jump to navigation Jump to search
Line 585: Line 585:     
[[File:Tripcomputer.jpg]]
 
[[File:Tripcomputer.jpg]]
 +
 +
The magnet is mounted on the wheel and the Hall effect sensor senses its magnetic field once a revolution. The program waits in action1 until the magnet arrives, and a voltage of >2.6V is sensed, it then waits in action2 till the magnet has passed, <2.5V. The current time in seconds is stored in box1. The program then waits for the magnet to arrive and pass. The wheel circumference, 2.1m is divided by the elapsed time (current time-box1) and the result is printed.
     
2,486

edits

Navigation menu