Q:

Registering Raspberry Pi with IBM Bluemix

I registered my Raspberry Pi with IBM Bluemix successfully .  It has dht22 temp and humidity sensor connected to it and running.  
Question: While building Internet of things starter app , do i need to code anything on Rpi to push that sensor data into Bluemix or simply providing the MAC address and the API will do the trick? 
Note: I followed a recipe to configure my Raspberry Pi , registered with the MAC address.  It is connected and sending messages when i check in the device. 
Kindly let me know if i need to do any other configuration or coding   to send specifically my dht22 sensor data to visualize in Bluemix and use it in Node-red. 

A:

By default Raspberry Pi recipe sends only the CPU temperature and CPU load.  As there are no sensors present in Raspberry Pi by default, the recipe uses parameters like CPUTemp and CPULoad.  
In your case, you will need to update the code to include dht22 temp and humidity parameters to be sent to IoTF(Bluemix).  Please check the code in Github for the raspberry Pi recipe - https://github.com/ibm-messaging/iot-raspberrypi
Navigate to samples/c for the recipe code.  You will have to gather the dht22 sensor data and convert them to JSON and send it to IoTF.  

In the iot.h, update the json struct to include your sensor values.  You can remove the cputtemp and cpuload parameters if you dont need them. 
In iotmain.c, line 152 update the code with the code to gather the dht22 sensor values.  
In jsonator.c, update the new sensor values based on your new struct.  

Then follow the steps provided here to compile the code and install the new deb file.  Now the iot service will send data with dht22 sensor values. 