How should I modify these code to send sensor reading to another Arduino?

Idea is to make a weather station using two Arduinos. They would communicate using RF transmitter and receiver. I tried to use VirtualWire library and its examples (named transmitter and receiver). I can send and print characters but I can't do the same with number(positive and negative). It's going to send temperature (both positive and negative) and barometer readings.
In my opinion I should send them in an array (int). 
How can make this work? Is there a better option for wireless communication?
Thanks

sort by: active | newest | oldest

Likewise decimal number 35 = 3 x10 + 5x1

Lets delimit the numbers with a space character " "

At the transmitting end

Transmit a " ", start new number

Transmit character "3',

transmit character "5"

At the receiving end:

If char=" " answer =0

While char <> " " DO

answer=(answer*10)+char


+1

CR LF

:-)

I often use the LF as the start of a reception packet, and the CR as the end. It makes processing messages a snip, and the output is human readable !

Makes easy decoding..

iceng25 days ago

A value number binary 0101 = decimal 5 = ASCII character 0011 0101 = Hex 35...

Convert numbers into characters !

+1