Let's move on to coding part. First, I define the motor pins. // M1 int enA = 5 ; int in1 = 3 ; int in2 = 4 ; // M2 int enB = 6 ; int in3 = 7 ; int in4 = 8 ; Then define the ultrasonics pins int trigLF = 11 ; // Trig - green Jumper int echoLF = 10 ; // Echo - yellow Jumper int trigRF = 18 ; // Trig - green Jumper int echoRF = 19 ; // Echo - yellow Jumper int trigF = 16 ; // Trig - green Jumper int echoF = 17 ; // Echo - yellow Jumper int trigRB = 14 ; // Trig - green Jumper int echoRB = 15 ; // Echo - yellow Jumper Likewise complete code you can find in the above link. https://github.com/buddhikadesilva/Wall-Maze-Solver-Robot See you.