Out of Sketch Subscribe Memory Error - Stops Shadow Updates

0

I am running an Arduino sketch that communicates with AWS through the IoT Core Service. It is using this SDK:

https://github.com/aws/aws-iot-device-sdk-arduino-yun

In the sketch, I am pushing a fluid volume variable to a Thing Shadow using a thing called Volume. Everything works well for the first 14 shadow updates then I get an error. Here is a condensed version of the log:

AWS IoT SDK Version(dev) 2.2.0-

LOG command: setup completed.
LOG command: config completed.
LOG command: connect completed.
LOG command: shadow init completed.
LOG command: register thing shadow delta function completed.
Resistance: 1553.95 ohms
Calculated volume: 1421.46923
LOG command: shadow update completed.
Resistance: 1569.67 ohms
Calculated volume: 1375.88024
ERR command: shadow update code: -4

From the SDK, here is a error description for -4: OUT_OF_SKETCH_SUBSCRIBE_MEMORY if the number of current subscribe exceeds the configured number in aws_iot_config_SDK.h.
That variable is currently set to 15 in my config file. #define MAX_SUB 15

How can I prevent this error from stopping my shadow updates?

Thanks,

Steve

질문됨 5년 전195회 조회
2개 답변
0

Problem has stopped happening after adding this code to the sketch:
if(myClient.yield()) {
Serial.println("Yield failed.");
}

답변함 5년 전
0

Solved.

답변함 5년 전

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

질문 답변하기에 대한 가이드라인

관련 콘텐츠