C++ IBM Bluemix raspberry pi发送传感器数据
我有一个树莓皮2,我在那里读取传感器数据,并显示在屏幕上;下面是我在Raspberry pi上运行的代码:C++ IBM Bluemix raspberry pi发送传感器数据,c++,raspberry-pi,ibm-cloud,iot,C++,Raspberry Pi,Ibm Cloud,Iot,我有一个树莓皮2,我在那里读取传感器数据,并显示在屏幕上;下面是我在Raspberry pi上运行的代码: #include "eHealth.h" void loop() { float temperature = eHealth.getTemperature(); printf("Temperature : %f \n", temperature); delay(2000); } int main(){ while(1){ loop(); } re
#include "eHealth.h"
void loop() {
float temperature = eHealth.getTemperature();
printf("Temperature : %f \n", temperature);
delay(2000);
}
int main(){
while(1){
loop();
}
return 0;
}
代码运行得很好,温度显示在命令行上。我想让它成为一个物联网应用程序,但我是一个初学者,我不知道如何设置。我尝试了IBMBlueMix并注册了该设备。它表示设备处于活动状态,但将设备设置为发送数据以可视化。任何帮助都将不胜感激。这将指导您如何将raspberry pi连接到物联网平台 有一种方法可以使用Pi上的节点Red连接Pi和平台,并创建Watson IoT平台节点。以下是有关如何做到这一点的视频:
本教程似乎没有提到如何让RaspberryPi将数据发送到任何地方——我想这就是OP所要求的?