Thingspeak controlling a LED using ESP32 example
이전 댓글 표시
Hi the aplication works fine but the command TURN_ON does not pass to the if-sentense. I saw some ware else solution to this poblem adding a senstence index on the POST function? Unfortunately I have lost the it an dcan not any more locate it. If there are no commands in the que it returns 0 and the lenght is 5. Below is the print outs from serial monitor
First no commands in the que
16:23:25.180 -> checking queue...
16:23:25.180 -> Latest command from queue:
16:23:25.180 -> 0
16:23:25.180 ->
16:23:25.180 ->
16:23:25.180 -> command lenght = 5
Then with TURN_ON
16:26:16.684 -> Latest command from queue:
16:26:16.684 -> 7
16:26:16.684 -> TURN_ON
16:26:16.684 -> 0
16:26:16.684 ->
16:26:16.684 ->
16:26:16.684 -> command lenght = 17
The else sentence else{
Serial.println(" Nothing new.");
}
also does not react to no new commands.
Any help is needed!
댓글 수: 3
Christopher Stapels
2021년 9월 27일
I presume you are printing out the command length. Can you describe what happens when you get 5 on this line:
'16:23:25.180 -> command lenght = 5'
Have you sent no commands to the device or ThingSpeak at this point? Can you show in your code where you added the print comment for length?
Risto Vesanto
2021년 9월 27일
Risto Vesanto
2021년 9월 27일
답변 (0개)
커뮤니티
더 많은 답변 보기: ThingSpeak 커뮤니티
카테고리
도움말 센터 및 File Exchange에서 Read Data from Channel에 대해 자세히 알아보기
제품
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!