user11604: I'm learning Arduino's world, but knowing very little about C and C++.
I'm trying to achieve a little RF transmitter which should send the temperature and  humidity from a DHT-11 sensor to a Raspberry Pi.
I'm using the RCSwitch library to send information with the Arduino, and the 433Utils library to receive it on the RPI.
Using those 2 libraries demos, I was able to send an integer, holding temperature or humidity information (mySwitch.send("00001010");), and read it on the RPI.
But how can I send both informations so that the RPI will know which one is the temperature and the humidity ? 
I know I could just send both and assume the lowest is the temperature, but this would be very messy and not very rewarding.
EDIT :
Following Edgar's answer in https://arduino.stackexchange.com/a/52992/11604, I know write:
void send_string(const char *str){
    int i = 0;
    for (char *p = str; *p; p++ ) {     
        mySwitch.send((i<<8) + *p, 16);
        i++;
    }
}

void loop() {   
    delay(1000); 
    h=40.650;
    t=32.0078;  
    hic=33.586;     
    String x = "$H" + String(h) + "T" + String(t) + "HI" + String(hic); 
    send_string(x.c_str());
}

Works perfectly ! (see his complete answer for the RPI-side code)

user4143: The library you have chosen is not designed for transmitting information between nodes. It is intended for sending simple ON/OFF commands to RF-connected switches.  Bending it to send data in the way you want would be difficult.  Not impossible, but difficult.
Instead you should be considering a more suitable system, such as the popular RadioHead library. It appears to have Raspberry Pi support out of the box:

Raspberry Pi Uses BCM2835 library for GPIO http://www.airspayce.com/mikem/bcm2835/ Currently works only with RH_NRF24 driver or other drivers that do not require interrupt support. Contributed by Mike Poublon.

Alternatively a small Arduino as an interface between the RF module and the Pi may be another option.

11604: <p>I'm learning Arduino's world, but knowing very little about C and C++.</p>

<p>I'm trying to achieve a little RF transmitter which should send the temperature and  humidity from a DHT-11 sensor to a Raspberry Pi.</p>

<p>I'm using the <code>RCSwitch</code> library to <a href="https://github.com/sui77/rc-switch/blob/master/examples/SendDemo/SendDemo.ino" rel="nofollow noreferrer">send information</a> with the Arduino, and the <code>433Utils</code> library to <a href="https://github.com/ninjablocks/433Utils/blob/master/RPi_utils/RFSniffer.cpp" rel="nofollow noreferrer">receive it</a> on the RPI.</p>

<p>Using those 2 libraries demos, I was able to send an integer, holding temperature or humidity information (<code>mySwitch.send("00001010");</code>), and read it on the RPI.</p>

<p><strong>But how can I send both informations so that the RPI will know which one is the temperature and the humidity ?</strong> </p>

<p>I know I could just send both and assume the lowest is the temperature, but this would be very messy and not very rewarding.</p>

<h2>EDIT :</h2>

<p>Following Edgar's answer in <a href="https://arduino.stackexchange.com/a/52992/11604">https://arduino.stackexchange.com/a/52992/11604</a>, I know write:</p>

<pre><code>void send_string(const char *str){
    int i = 0;
    for (char *p = str; *p; p++ ) {     
        mySwitch.send((i&lt;&lt;8) + *p, 16);
        i++;
    }
}

void loop() {   
    delay(1000); 
    h=40.650;
    t=32.0078;  
    hic=33.586;     
    String x = "$H" + String(h) + "T" + String(t) + "HI" + String(hic); 
    send_string(x.c_str());
}
</code></pre>

<p>Works perfectly ! (see his complete answer for the RPI-side code)</p>
 4143: <p>The library you have chosen is not designed for transmitting information between nodes. It is intended for sending simple ON/OFF commands to RF-connected switches.  Bending it to send data in the way you want would be difficult.  Not impossible, but difficult.</p>

<p>Instead you should be considering a more suitable system, such as the popular <a href="http://www.airspayce.com/mikem/arduino/RadioHead/" rel="nofollow noreferrer">RadioHead</a> library. It appears to have Raspberry Pi support out of the box:</p>

<blockquote>
  <p>Raspberry Pi Uses BCM2835 library for GPIO <a href="http://www.airspayce.com/mikem/bcm2835/" rel="nofollow noreferrer">http://www.airspayce.com/mikem/bcm2835/</a> Currently works only with RH_NRF24 driver or other drivers that do not require interrupt support. Contributed by Mike Poublon.</p>
</blockquote>

<p>Alternatively a small Arduino as an interface between the RF module and the Pi may be another option.</p>
