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

feita há 5 anos195 visualizações
2 Respostas
0

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

respondido há 5 anos
0

Solved.

respondido há 5 anos

Você não está conectado. Fazer login para postar uma resposta.

Uma boa resposta responde claramente à pergunta, dá feedback construtivo e incentiva o crescimento profissional de quem perguntou.

Diretrizes para responder a perguntas