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

asked 5 years ago188 views
2 Answers
0

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

answered 5 years ago
0

Solved.

answered 5 years ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions