我一直在尝试将Seeduino微控制器连接到AWS IoT平台以发送MQTT消息。我已经开始使用此处提供的Amazon SDK工具包提供的基本PubSub示例:https://github.com/aws/aws-iot-device-sdk-arduino-yun/tree/master/AWS-IoT-Arduino-Yun-Library/examples/BasicPubSub
以下是我修改它以连接到AWS后的标题代码:
// Copy and paste your configuration into this file
//===============================================================
#define AWS_IOT_MQTT_HOST "a39furswz813o0.iot.us-west-2.amazonaws.com" // your endpoint
#define AWS_IOT_MQTT_PORT 8883 // your port
#define AWS_IOT_CLIENT_ID "iotconsole-1520362244976-0" // your client ID
#define AWS_IOT_MY_THING_NAME "Seed1" // your thing name
#define AWS_IOT_ROOT_CA_FILENAME "root-CA.crt" // your root-CA filename
#define AWS_IOT_CERTIFICATE_FILENAME "d48740b57e-certificate.pem.crt" // your certificate filename
#define AWS_IOT_PRIVATE_KEY_FILENAME "d48740b57e-private.pem.key" // your private key filename
我在错误的标题代码中是否有任何错误可能会导致此问题?我还没有修改过BasicPubSub代码。我怎么知道它是否与AWS平台连接?提前谢谢?