Pls can some one help me in programming my arduino please.

And i use a adafruit motor driver instead of the pololu motor driver(which is used in the original program)which caused all the problems.

Why did you choose different hardware, if you had code that used a specific piece of hardware?