Automated Bi-Directional Linear Positioner
RailTrack Express is an intelligent, automated control system designed to manage the linear movement of an object along a fixed track. Utilizing an Arduino microcontroller paired with an H-bridge motor driver, the system coordinates precise forward and reverse transit. Infrared (IR) proximity sensors act as digital limit switches at both ends of the track, automating direction shifts and preventing mechanical over-travel.
This architecture simulates real-world applications found in automated factory conveyor belts, camera sliders, and automated storage and retrieval systems (ASRS).

Directional Interlocking Protection: The DIRECTION_DELAY variable inserts a 1000ms pause whenever a switch is tripped. This allows the physical kinetic energy of the object to disperse before the motor forces a structural direction change, protecting your H-bridge and gears from back-EMF current spikes.
Fail-Safe Interrupted State: If the system is paused mid-track via the button, the code drops all motor drive pins to logic LOW. The motor coasts cleanly to a stop without losing its relative software position state (MOVING_FORWARD or MOVING_REVERSE).