Gearmotor program

We did the 12V and the motor operates manually by touching the terminals with wire, but we want it to work automatically.