Basically i need to make a autonomous model car to hit a wall at an unknown distance and return to its original position.
My idea was to potentially have a capacitor charge and discharge 2 different motors, with a DPDT switch to reverse the polarity of the 2nd motor so that it reverses.
Is this a school/college project?
What do you mean by 'charge and discharge two different motors'?
Why two motors?
What will the other motor do when the second one is reversed?