I faced this type of Error

“/src/main.cpp”, line 858: Error: #20: identifier “thread_sleep_for” is undefined
thread_sleep_for(500);
^

Hello,

that can be caused by using older version of MbedOS where this function was not implemented.

BR, Jan

hi
thanks for your Support ,
instanced of this thread_sleep_for(500),
which one i have to Select, can i take wait_ms(500);

Yes, old Mbed used like below and it is not in MbedOS 6+

 wait(0.5) // in sec
// or
 wait_ms(500);

BR, Jan

yes its compile thanks you very much.