IBM Bluemix - Arduino 示例的 IBM IOT 输出节点配置

IBM Bluemix - IBM IOT out node configuration for Arduino example

我的 Node-RED 编辑器中有 IBM tutorial on using Arduino+Bluemix, up and running. I would now like to take a decision on the cloud and let the Arduino subscribe to a topic containing the decision message. For this, I am trying to use the IBM IOT out node。但是,我不确定如何配置此节点。

是否有任何教程涵盖此用例(IBM IOT out 节点 + Arduino、MQTT)或关于节点属性的文档?

谢谢。 NK

您需要配置 IBM IoT out 节点以将消息发布到您的 Arduino 的设备 ID。 msg.payload 将是您发送给 Arduino 的消息。您还需要设置 topic,该主题也包含您的 deviceId。然后您需要让您的 Arduino 订阅主题以接收消息。

这是我在 Coursera 物联网课程中使用的物联网输出节点的图片,适用于我将数据发送到插入我的 pi 的 Sense HAT 设备。

在客户端,我正在使用 NodeRED(使用 Pi 这很容易 :-) 和一个 IoT 输入节点,用于订阅命令。

文档在 订阅命令.

标题下描述了如何订阅命令 HERE

订阅主题应该是iot-2/cmd/[command_id]/fmt/[format_string],所以我的pi订阅图片中的命令主题应该是iot-2/cmd/display/fmt/json——虽然我自己没试过,但应该是工作。