Making Smart Home application wireless

My project is Smart Home application reading

  1. Temperature (temp sensor) 2) Presence of human (PIR and LDR for motion) 3) Wireless communication using Xbee

Now I am Stuck with the final step that is the integration of the functions and the data communication.
Tried modifying the Xbee example provided for the output but it did not work.
Things to be achieved.

  1. On Tx: Send the temperature(integer value), count(interger value), Ldr(High or low)
  2. On Rx: receive this values and accordingly regulate the fan and switch on off function.

All the other process or functions are ready.

Please help me with a code that can achieve the above mentioned.

NOW PLEASE HELP

main_tx.ino (7.22 KB)

Read this, carefully. How to post code properly

Pete

Sorry for the miss conduct with the post.

Please help me with some ideas.

The Rx I tried for the receiving from the above attached Tx program returns junk values. The code i tried is the modification in the serial_1Rx example API mode.

Can anyone please tell me how to read the values transmitted.????