Closed virtlima closed 8 years ago
Hi @virtlima ,
Thank you very much for using AWS IoT Arduino Yun SDK!
The line you are having issue with is used for SDK draining interval configuration, where you can specify different interval time (in seconds) to drain out the queued publish requests while offline after the connection of the device is recovered.
dtostrf
is a function available on AVR/Arduino Yun. One thing you can try is to specifically include the header file to see if it is available on your device by adding #include <avr/dtostrf.h>
. Otherwise you will have to include the implementation into your sketch.
The other thing you need to keep in mind is that the AWS IoT Arduino Yun SDK is built specifically for Arduino Yun and its compatible boards. The SDK is built on top of the dual-processor architecture where sketch API calls are converted into commands over Serial1 bridge and get transmitted to the AR9331 for further processing. If your device does not have such architecture, it might not work even if the sketch compiles. You can still use other AWS IoT Device SDKs for an Intel Edison board: AWS IoT Embedded C SDK: https://github.com/aws/aws-iot-device-sdk-embedded-C AWS IoT Node.js SDK: https://github.com/aws/aws-iot-device-sdk-js
Please let us know if you have further questions.
Thanks, Liusu
So I am trying to run (just clicking on the check mark to verify) the Pub\Sub Example through Arduino and I get the following errors:
C:\Users..\Documents\Arduino\libraries\AWS-IoT-Arduino-Yun-Library\aws_iot_mqtt.cpp: In member function 'IoT_Error_t aws_iot_mqtt_client::configDrainingInterval(float)':
C:\Users..\Documents\Arduino\libraries\AWS-IoT-Arduino-Yun-Library\aws_iot_mqtt.cpp:211:39: error: 'dtostrf' was not declared in this scope
dtostrf(numberOfSeconds, 5, 2, rw_buf); // Only support XX.XX (including sign+/-)
Using library AWS-IoT-Arduino-Yun-Library in folder: C:\Users..\Documents\Arduino\libraries\AWS-IoT-Arduino-Yun-Library (legacy) exit status 1 Error compiling for board Intel® Edison.
Looks like I need to specify config, but sure where. I have tried a couple things but to no avail only get other errors. figured I would ask.