Registering Raspberry Pi with IBM Bluemix -
i registered raspberry pi ibm bluemix . has dht22 temp , humidity sensor connected , running.
question: while building internet of things starter app , need code on rpi push sensor data bluemix or providing mac address , api trick?
note: followed recipe configure raspberry pi , registered mac address. connected , sending messages when check in device.
kindly let me know if need other configuration or coding send dht22 sensor data visualize in bluemix , use in node-red.
by default raspberry pi recipe sends cpu temperature , cpu load. there no sensors present in raspberry pi default, recipe uses parameters cputemp , cpuload.
in case, need update code include dht22 temp , humidity parameters sent iotf(bluemix). please check code in github raspberry pi recipe - https://github.com/ibm-messaging/iot-raspberrypi
navigate samples/c recipe code. have gather dht22 sensor data , convert them json , send iotf.
in iot.h, update json struct include sensor values. can remove cputtemp , cpuload parameters if dont need them.
in iotmain.c, line 152 update code code gather dht22 sensor values.
in jsonator.c, update new sensor values based on new struct.
then follow steps provided here compile code , install new deb file. iot service send data dht22 sensor values.
Comments
Post a Comment