Infinite "while" statement
My_Decoder.value doesn't change inside obstacle_avoiding(). Hence, while is running infinitely.

I think you have to delete the while, and let loop() take care of controlling the execution.

Addendum

The intent of the loop() is to read some IR data in value. I under the impression that getResults() sometimes block, acording to this:


  However the IRrecvLoop is not interrupt driven and so when you call
  GetResults it sits in a tight loop and does not release control back
  to you until the complete signal has been received.


I also want to check that value doesn't change if getResults() return nothing with this loop()

void loop() {
bool r = My_Receiver.GetResults(&amp;My_Decoder)
Serial.print("getResults()=");
Serial.print(r);
Serial.print(" value=");
Serial.println(My_Decoder.value);

if (r) {
    //Restart the receiver so it can be capturing another code
    //while we are working on decoding this one.
    My_Receiver.resume();
    My_Decoder.decode();
} else {
    if (My_Decoder.value == 0xFF807F &amp;&amp; My_Decoder.value != 0xFF0AF5) {
        obstacle_avoiding();
        }
    }
}


I hope this works!