   }
 } 
 
+
+// this is where obstacle detection and avoidance starts
 #include <NewPing.h>
 double cm[1]; //sensed distance of sonar sensor : 2 represents array(2 sonar sensors)
 int trigger[1] = {40}; //trigger pins assignment  (sends)   

        

}

void reset_path() {
  for(int i = 0; i <20; i++){
    for(int j = 0; j <20; j++){  

  NewPing(trigger[0], echo[0], 500), //500 represents type of sensor
};

//copied from robot code
void updateSonar() {
  for (int i = 0; i < 1; i++) {
    //cm[i]=sonar[i].ping_cm();
