aREST 및 ESP8266을 사용 중입니다. 작업을 수행 할 때까지 클라이언트의 요청을 보관하는 개인화 된 방법을 만들고 싶었습니다. 그러나 simnple (true)은 즉시 보드를 재부팅합니다.ESP8266 + aRest 메모리 부족 및 재부팅
개인화 된 기능 내의 이러한 블록이 ESP8622를 재부팅하는 이유는 무엇입니까? 다른 방법으로도 해낼 수 있습니까?
int receiveCommand(String command){
int timeStart = millis();
while(true){
//My code goes here
//Waits for action during TIMEOUT seconds then breaks this loop and
//Returns something suitible to the client
if((millis() - timeStart) > TIMEOUT){
return 0;
}
}
return 1;
}
동결을 막기 위해'yield()'일명'delay (0)'을 루프에 추가하면됩니다. – dandavis