Can anyone help make a coding for my project?

Sounds like a lawnmower. Post your annotated schematic as you have it. Also post the technical details on the motor. Also the L293 may be light, it will drop 3V and burn that as heat or 25% of your battery energy.