Basically I need to make a vehicle move a set distance touch a wall and reverse the same distance and stop all on its own. Im looking to have a motor powering the front wheels and a motor powering the rear wheels. So I am thinking, a battery to power the motor to move forwards and as it is doing so it charges a capacitor, the capacitor will then power the rear motor to make it reverse. When it touches a wall I was thinking of having a switch which cuts the signal from the battery to the front motor and thus sending the charge in the capacitor to the motor to make it reverse. Can I make this work and if so how exactly??
Thanks in advance
Thanks in advance