user14918: I am trying to make a sensor that gets temperature and humidity values from a DHT22 and send it through NRF24L01+ to a Raspberry Pi 2 Model B.
To connect NRF24L01+ to ATtiny85 and to free two pins for the DHT22, I used this link.
There is a scheme of my sensor:

There is a photo of the test board with the sensor (sorry, it is very untidy, because I remade it many times before to fix the problem):

I program the ATtiny85 with Arduino IDE (with 8 MHz clock).
I used this library and radio communication is working perfectly (it can't be an error during the radio transmission).
Here is the code of my ATtiny85:
#include <DHT.h>
#include <RF24.h>

byte currentNodeAddr[6] = "1Node";  // Address of this node

// Struct for sending measured data
struct Data {
  uint16_t temp;  // Temperature value
  uint16_t hum;   // Humidity value
  int status;     // DHT22 module status
} data;

RF24 radio(2,2);  // Create instance of RF24 radio object
DHT dht;          // Create instance of DHT22 module object

void setup() {
  // Set up the radio
  radio.begin();
  radio.openWritingPipe(currentNodeAddr);
  radio.stopListening();
  dht.setup(3); // Set up the sensor on PB3 pin
}

void loop() {
  // This DHT library can calculate the delay but it may be 2+ sec
  delay(dht.getMinimumSamplingPeriod());
  // Get values from DHT22
  data.temp = dht.getTemperature();
  data.hum = dht.getHumidity();
  radio.write(&data, sizeof(Data));  // Send data to the Raspberry
}

But I can't the get temperature and humidity values from the DHT22. I used a lot of different libraries for DHT22 (for example, github.com/ringerc/Arduino-DHT22, github.com/nethoncho/Arduino-DHT22, github.com/jscrane/DHT22, etc.) and none of them works (they return zeros, NAN, or, generally, timeout error). And it seems that the connection with the DHT22 is correct (there were connection errors and I fixed them). I tried to use a lot of DHT22 modules, so the problem can't be a defective module.
Yes, I put a 2 second (and more) delay in between read requests. Yes, I added a 10k resistor between pin 1 and 2 of the DHT22.
Now I am thinking that the libraries work fine, but may be free pins (PB3 or PB4) of ATtiny85 can't receive data for some reason.
Tell me please where may be an error or a bug? Thank you in advance! And also many thanks to authors of all links and repositories that I have mentioned here!
EDIT (in accordance with frarugi87's answer):
At first I have grounded 3 and 4 pins of the DHT22.
When I program ATtiny at the 1 MHz, values are sent every 2 seconds (as it should be), but when I program ATtiny at 8 MHz, values are sent every 16 seconds (is it correct?).
I used the suggested code to check the radio library and it seems it works pretty well (values are being incremented and sent):

After that I used the suggested library (RobTillaart/Arduino v. 0.1.21) and at first time it returned some strange values (humidity and the status were 0 and temperature was MAX_INT value), but when I have tried to get only status value as string, the library also has returned -2 (DHTLIB_ERROR_TIMEOUT). This time I program ATTiny at 8 MHz:

Also I tried to get values without NRF24L01+ through I2C connection between the ATtiny85 and the Raspberry Pi. Result was the same (DHTLIB_ERROR_TIMEOUT):

Maybe the problem is in timings of ATtiny85 or in the program process?
I used these links (1, 2, 3) to set up Arduino IDE on Raspbian.
Here is list of useful links for this project which I found to implement it (I hope the authors will not mind that I posted their links here):
Arduino/AVR DHT projects and libraries:

Arduino Wireless Weather Station
Mini weather station with Attiny85
Easy IoT weather station with multiple sensors
ATtiny84 & RFM12B wireless sensor node
DHT11 HUMIDITY & TEMPERATURE SENSOR MODULE
DHT22 running @ 8MHZ
DHT22 not working with 8mhz clockspeed?
Adafruit DHT Library and ATtiny85
Class for DHTxx sensors
An Arduino library for reading the DHT family of temperature and humidity sensors
Using a RHT03 (aliases: RHT-22, DHT22, AM2302) temperature/humidity sensor from Arduino
Arduino-library for DHT11/DHT22 sensors reading
Efficient DHT library for Arduino
Feuchtesensor AM2302/DHT22
7 Segment Digital Thermometer using ATtiny 85
Wiring up DHT humidity sensors
Attiny85 RF Transmitter to Arduino Uno Receiver
Arduino library for the DHT22 humidity and temperature sensor
Arduino library for DHT11DHT22, etc Temp & Humidity Sensors
A simplified DHT11/DHT22/AM2302 library for use with the Trinket/Gemma
Arduino library for the DHT22 humidity and temperature sensor 
Arduino sketch code for reading RHT03 (also known as DHT22, RHT22, and AM2302) temperature/humidity sensor

Arduino/AVR nRF24L01 projects and libraries:

Optimized fork of nRF24L01 for Arduino and Raspberry
Optimized Network Layer for nRF24L01(+) Radios on Arduino and Raspberry Pi
nrf24l01+ control with 3 ATtiny85 pins
NRF24L01 real life range test
Optimized fork of nRF24L01 for Arduino and Raspberry Pi
NRF24L01 SIX CHANNELS TO ONE RECEIVER
Arduino attiny support files for nRF24L01 RF modules
ARDUINO + RASPBERRY PI Switching light with NRF24l01+

Programming the ATtiny85 from Raspberry-Pi:

Programming the ATtiny85 from Raspberry Pi
Arduino IDE Installation
Arduino for other Chips
Tiny AVR Programmer Hookup Guide
ATtiny85 with Arduino IDE and Gertboard
Setting up the Arduino IDE on Raspbian

Arduino/AVR FR433 libraries:

433Kit is a collection of code and documentation designed to assist you in the connection and usage of RF 433MHz transmit and receive modules to/with your Arduino and Rapberry Pi
Tiny AVR Programmer Hookup Guide

Troubleshooting:

Wrong reading value for DH22 & get stuck after running for a while
DHT22 Sensor - sync timeout


user14918: Thanks to Rob Tillaart, the autor of the Arduino DHT library suggested by @frarugi87 (also thank him), the problem has been solved (see this issue for more information).
In my case to fix the problem there is only needed to to set a specific value of DHTLIB_TIMEOUT by leaving the definition #define DHTLIB_TIMEOUT 1000 in the dht.h file of this library and commenting other definitions written next to it:
// #ifndef F_CPU
#define DHTLIB_TIMEOUT 1000 // should be approx. clock/40000
// #else
// #define DHTLIB_TIMEOUT (F_CPU/40000)
// #endif

The ATtiny is programmed on 8 MHz. The DHT22 is working at a voltage of 3.3V with a 3K3 resistor.
The cause of the problem may be the way I program the ATtiny85 with old version of Arduino IDE installed in the Raspberry Pi (see comments to the @frarugi87's answer). 
Libraries used:

RobTillaart/Arduino DHT11, 21, 22, 33 library
Arduino driver for nRF24L01 http://maniacbug.github.com/RF24

Here is the final code of the ATtiny85 transmitter and the Raspberry Pi reseiver respectively (I took the most part of the code from different examples of RF24 libraries and DHT libraries! Excuse me, if the code is not tidy.).
NRF24Transmitter.ino:
#include <dht.h>
#include <RF24.h>

#define DHT22_PIN 3
#define LONG_DELAY_MS 900000

byte currentNodeAddr[6] = "1Node";  // Address of this node

// Struct for sending measured data
struct Data {
  float temp;  // Temperature value
  float hum;   // Humidity value
  int status;     // DHT22 module status
} data;

RF24 radio(2,2);  // Create instance of RF24 radio object
dht DHT;          // Create instance of DHT22 module object

void setup() {
  // Set up the radio
  radio.begin();
  radio.openWritingPipe(currentNodeAddr);
  radio.stopListening();
}

void loop() {

  unsigned long startMillis = millis();
  while (millis() - startMillis < LONG_DELAY_MS);

  do {
    data.status = DHT.read22(DHT22_PIN);
    data.temp = DHT.temperature;
    data.hum = DHT.humidity;

    if (data.status != DHTLIB_OK) {
      delay(1000);
    }

  } while(data.status != DHTLIB_OK);

  radio.write(&data, sizeof(Data));  // Send data to the Raspberry
}

Receiver.cpp:
#include <cstdlib>
#include <iostream>
#include <sstream>
#include <string>
#include <unistd.h>
#include <RF24/RF24.h>

using namespace std;

uint8_t addresses[][6] = {"1Node", "2Node", "3Node", "4Node", "5Node"};

// Struct for sending measured data
struct Data 
{
    float temp;  // Temperature value
    float hum;   // Humidity value
    int status;     // DHT22 module status
} data;

RF24 radio(RPI_V2_GPIO_P1_22, RPI_V2_GPIO_P1_24, BCM2835_SPI_SPEED_8MHZ);

int main(int argc, char** argv)
{
    uint8_t currentPipe = 1;
    data.temp = -888;
    data.hum = -888;

    printf("BEGIN: %d\n", (int)radio.begin());

    radio.setAutoAck(1);
    radio.setRetries(15,15);
//  radio.setDataRate(RF24_1MBPS);
//  radio.setPALevel(RF24_PA_MAX);
//  radio.setCRCLength(RF24_CRC_16);

    radio.openReadingPipe(1, addresses[0]);
    radio.openReadingPipe(2, addresses[1]);
    radio.openReadingPipe(3, addresses[2]);
    radio.openReadingPipe(4, addresses[3]);
    radio.openReadingPipe(5, addresses[4]);

    radio.startListening();

    radio.printDetails();

    sleep(1);

    cout << "Start!" << endl;

    while(true)
    {
        cout << "Waiting for data..." << endl;

        while (radio.available(&currentPipe)) 
        {
            cout << "Reading: " << addresses[currentPipe - 1] << "..." << endl;

            radio.read(&data, sizeof(Data));

            cout << "Temp: " << data.temp << endl;
            cout << "Hum: " << data.hum << endl;
            cout << "Status: " << data.status << endl;
        }

        sleep(1);
    }   

    return 0;
}

Here is Makefile to compile the receiver.cpp:
#############################################################################
#
# Makefile for librf24 examples on Raspberry Pi
#
# License: GPL (General Public License)
# Author:  gnulnulf <arco@appeltaart.mine.nu>
# Date:    2013/02/07 (version 1.0)
#
# Description:
# ------------
# use make all and make install to install the examples
# You can change the install directory by editing the prefix line
#
prefix := /usr/local

# Detect the Raspberry Pi by the existence of the bcm_host.h file
BCMLOC=/opt/vc/include/bcm_host.h

ifneq ("$(wildcard $(BCMLOC))","")
# The recommended compiler flags for the Raspberry Pi
CCFLAGS=-Ofast -mfpu=vfp -mfloat-abi=hard -march=armv6zk -mtune=arm1176jzf-s
endif

# define all programs
#PROGRAMS = scanner pingtest gettingstarted
PROGRAMS = receiver #gettingstarted gettingstarted_call_response transfer pingpair_dyn test
SOURCES = ${PROGRAMS:=.cpp}

all: ${PROGRAMS}

${PROGRAMS}: ${SOURCES}
    g++ ${CCFLAGS} -Wall -I../ -lrf24-bcm $@.cpp -o $@

clean:
    rm -rf $(PROGRAMS)

install: all
    receiver -d $(prefix) || mkdir $(prefix)
    receiver -d $(prefix)/bin || mkdir $(prefix)/bin
    for prog in $(PROGRAMS); do \
      install -m 0755 $$prog $(prefix)/bin; \
    done

.PHONY: install


14918: <p>I am trying to make a sensor that gets temperature and humidity values from a DHT22 and send it through NRF24L01+ to a Raspberry Pi 2 Model B.</p>

<p>To connect NRF24L01+ to ATtiny85 and to free two pins for the DHT22, I used <a href="http://hackster.io/arjun/nrf24l01-with-attiny85-3-pins-74a1f2" rel="nofollow noreferrer">this link</a>.</p>

<p>There is a scheme of my sensor:
<a href="https://i.stack.imgur.com/Ip0Y4.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/Ip0Y4.png" alt="enter image description here"></a></p>

<p>There is a photo of the test board with the sensor (sorry, it is very untidy, because I remade it many times before to fix the problem):
<a href="https://i.stack.imgur.com/52X6K.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/52X6K.jpg" alt="enter image description here"></a></p>

<p>I program the ATtiny85 with Arduino IDE (with 8 MHz clock).</p>

<p>I used <a href="http://github.com/TMRh20/RF24" rel="nofollow noreferrer">this library</a> and radio communication is working perfectly (it can't be an error during the radio transmission).</p>

<p>Here is the code of my ATtiny85:</p>

<pre class="lang-c prettyprint-override"><code>#include &lt;DHT.h&gt;
#include &lt;RF24.h&gt;

byte currentNodeAddr[6] = "1Node";  // Address of this node

// Struct for sending measured data
struct Data {
  uint16_t temp;  // Temperature value
  uint16_t hum;   // Humidity value
  int status;     // DHT22 module status
} data;

RF24 radio(2,2);  // Create instance of RF24 radio object
DHT dht;          // Create instance of DHT22 module object

void setup() {
  // Set up the radio
  radio.begin();
  radio.openWritingPipe(currentNodeAddr);
  radio.stopListening();
  dht.setup(3); // Set up the sensor on PB3 pin
}

void loop() {
  // This DHT library can calculate the delay but it may be 2+ sec
  delay(dht.getMinimumSamplingPeriod());
  // Get values from DHT22
  data.temp = dht.getTemperature();
  data.hum = dht.getHumidity();
  radio.write(&amp;data, sizeof(Data));  // Send data to the Raspberry
}
</code></pre>

<p>But I can't the get temperature and humidity values from the DHT22. I used a lot of different libraries for DHT22 (for example, <em>github.com/ringerc/Arduino-DHT22, github.com/nethoncho/Arduino-DHT22, github.com/jscrane/DHT22</em>, etc.) and none of them works (they return zeros, NAN, or, generally, timeout error). And it seems that the connection with the DHT22 is correct (there were connection errors and I fixed them). I tried to use a lot of DHT22 modules, so the problem can't be a defective module.</p>

<p>Yes, I put a 2 second (and more) delay in between read requests. Yes, I added a 10k resistor between pin 1 and 2 of the DHT22.</p>

<p>Now I am thinking that the libraries work fine, but may be free pins (PB3 or PB4) of ATtiny85 can't receive data for some reason.</p>

<p>Tell me please where may be an error or a bug? Thank you in advance! And also many thanks to authors of all links and repositories that I have mentioned here!</p>

<p><strong>EDIT (in accordance with frarugi87's answer):</strong></p>

<p>At first I have grounded 3 and 4 pins of the DHT22.</p>

<p>When I program ATtiny at the <strong>1 MHz</strong>, values are sent every 2 seconds (as it should be), but when I program ATtiny at <strong>8 MHz</strong>, values are sent every 16 seconds (is it correct?).</p>

<p>I used the suggested code to check the radio library and it seems it works pretty well (values are being incremented and sent):
<a href="https://i.stack.imgur.com/m8oH8.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/m8oH8.png" alt="Test radio library"></a></p>

<p>After that I used the suggested library (<a href="https://github.com/RobTillaart/Arduino" rel="nofollow noreferrer">RobTillaart/Arduino</a> v. 0.1.21) and at first time it returned some strange values (humidity and the status were 0 and temperature was MAX_INT value), but when I have tried to get only status value as string, the library also has returned -2 (DHTLIB_ERROR_TIMEOUT). This time I program ATTiny at 8 MHz:
<a href="https://i.stack.imgur.com/XnmDS.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/XnmDS.png" alt="enter image description here"></a></p>

<p>Also I tried to get values without NRF24L01+ through I2C connection between the ATtiny85 and the Raspberry Pi. Result was the same (DHTLIB_ERROR_TIMEOUT):
<a href="https://i.stack.imgur.com/RcpKr.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/RcpKr.png" alt="enter image description here"></a></p>

<p>Maybe the problem is in timings of ATtiny85 or in the program process?
I used these links (<a href="http://spellfoundry.com/sleepy-pi/setting-arduino-ide-raspbian/" rel="nofollow noreferrer">1</a>, <a href="https://www.raspberrypi.org/forums/viewtopic.php?f=42&amp;t=76639" rel="nofollow noreferrer">2</a>, <a href="https://projects.drogon.net/raspberry-pi/gertboard/arduino-ide-installation-isp/" rel="nofollow noreferrer">3</a>) to set up Arduino IDE on Raspbian.</p>

<p><strong>Here is list of useful links for this project which I found to implement it (I hope the authors will not mind that I posted their links here)</strong>:</p>

<p>Arduino/AVR DHT projects and libraries:</p>

<ul>
<li><a href="http://www.instructables.com/id/Arduino-Wireless-Weather-Station/" rel="nofollow noreferrer">Arduino Wireless Weather Station</a></li>
<li><a href="http://www.instructables.com/id/Mini-weather-station-with-Attiny85/" rel="nofollow noreferrer">Mini weather station with Attiny85</a></li>
<li><a href="http://www.instructables.com/id/Esay-IoT-Weather-Station-With-Multiple-Sensors/" rel="nofollow noreferrer">Easy IoT weather station with multiple sensors</a></li>
<li><a href="https://github.com/nathanchantrell/TinyTX" rel="nofollow noreferrer">ATtiny84 &amp; RFM12B wireless sensor node</a></li>
<li><a href="http://www.uugear.com/portfolio/dht11-humidity-temperature-sensor-module/" rel="nofollow noreferrer">DHT11 HUMIDITY &amp; TEMPERATURE SENSOR MODULE</a></li>
<li><a href="http://forum.arduino.cc/index.php?topic=269216.0" rel="nofollow noreferrer">DHT22 running @ 8MHZ</a></li>
<li><a href="http://forum.arduino.cc/index.php?topic=97915.0" rel="nofollow noreferrer">DHT22 not working with 8mhz clockspeed?</a></li>
<li><a href="http://forum.arduino.cc/index.php?topic=124457" rel="nofollow noreferrer">Adafruit DHT Library and ATtiny85</a></li>
<li><a href="http://playground.arduino.cc/Main/DHTLib" rel="nofollow noreferrer">Class for DHTxx sensors</a></li>
<li><a href="https://github.com/markruys/arduino-DHT" rel="nofollow noreferrer">An Arduino library for reading the DHT family of temperature and humidity sensors</a></li>
<li><a href="http://blog.ringerc.id.au/2012/01/using-rht03-aliases-rht-22.html" rel="nofollow noreferrer">Using a RHT03 (aliases: RHT-22, DHT22, AM2302) temperature/humidity sensor from Arduino</a></li>
<li><a href="https://github.com/amperka/dht" rel="nofollow noreferrer">Arduino-library for DHT11/DHT22 sensors reading</a></li>
<li><a href="https://github.com/markruys/arduino-DHT" rel="nofollow noreferrer">Efficient DHT library for Arduino</a></li>
<li><a href="http://www.pgollor.de/cms/?page_id=1013" rel="nofollow noreferrer">Feuchtesensor AM2302/DHT22</a></li>
<li><a href="http://www.instructables.com/id/7-Segment-Digital-Thermometer-using-ATtiny-85/?ALLSTEPS" rel="nofollow noreferrer">7 Segment Digital Thermometer using ATtiny 85</a></li>
<li><a href="https://learn.adafruit.com/dht-humidity-sensing-on-raspberry-pi-with-gdocs-logging/wiring" rel="nofollow noreferrer">Wiring up DHT humidity sensors</a></li>
<li><a href="http://www.instructables.com/id/Attiny85-RF-Transmitter-to-Arduino-Uno-Receiver-Ma/" rel="nofollow noreferrer">Attiny85 RF Transmitter to Arduino Uno Receiver</a></li>
<li><a href="https://github.com/nethoncho/Arduino-DHT22" rel="nofollow noreferrer">Arduino library for the DHT22 humidity and temperature sensor</a></li>
<li><a href="https://github.com/adafruit/DHT-sensor-library" rel="nofollow noreferrer">Arduino library for DHT11DHT22, etc Temp &amp; Humidity Sensors</a></li>
<li><a href="https://github.com/adafruit/TinyDHT" rel="nofollow noreferrer">A simplified DHT11/DHT22/AM2302 library for use with the Trinket/Gemma</a></li>
<li><a href="https://github.com/nathanchantrell/Arduino-DHT22" rel="nofollow noreferrer">Arduino library for the DHT22 humidity and temperature sensor </a></li>
<li><a href="https://github.com/ringerc/scrapcode/blob/master/arduino_avr/RHT03_DHT22_humidity_temp_sensor.c" rel="nofollow noreferrer">Arduino sketch code for reading RHT03 (also known as DHT22, RHT22, and AM2302) temperature/humidity sensor</a></li>
</ul>

<p>Arduino/AVR nRF24L01 projects and libraries:</p>

<ul>
<li><a href="https://github.com/TMRh20/RF24" rel="nofollow noreferrer">Optimized fork of nRF24L01 for Arduino and Raspberry</a></li>
<li><a href="https://github.com/TMRh20/RF24Network" rel="nofollow noreferrer">Optimized Network Layer for nRF24L01(+) Radios on Arduino and Raspberry Pi</a></li>
<li><a href="http://nerdralph.blogspot.ru/2014/01/nrf24l01-control-with-3-attiny85-pins.html" rel="nofollow noreferrer">nrf24l01+ control with 3 ATtiny85 pins</a></li>
<li><a href="https://hallard.me/nrf24l01-real-life-range-test/" rel="nofollow noreferrer">NRF24L01 real life range test</a></li>
<li><a href="https://github.com/edoardoo/RF24" rel="nofollow noreferrer">Optimized fork of nRF24L01 for Arduino and Raspberry Pi</a></li>
<li><a href="https://www.itead.cc/blog/nrf24l01-six-channels-to-one-receiver" rel="nofollow noreferrer">NRF24L01 SIX CHANNELS TO ONE RECEIVER</a></li>
<li><a href="https://github.com/stanleyseow/attiny-nRF24L01" rel="nofollow noreferrer">Arduino attiny support files for nRF24L01 RF modules</a></li>
<li><a href="http://hack.lenotta.com/arduino-raspberry-pi-switching-light-with-nrf24l01/" rel="nofollow noreferrer">ARDUINO + RASPBERRY PI Switching light with NRF24l01+</a></li>
</ul>

<p>Programming the ATtiny85 from Raspberry-Pi:</p>

<ul>
<li><a href="http://www.instructables.com/id/Programming-the-ATtiny85-from-Raspberry-Pi/?ALLSTEPS" rel="nofollow noreferrer">Programming the ATtiny85 from Raspberry Pi</a></li>
<li><a href="https://projects.drogon.net/raspberry-pi/gertboard/arduino-ide-installation-isp/" rel="nofollow noreferrer">Arduino IDE Installation</a></li>
<li><a href="http://playground.arduino.cc/Main/ArduinoOnOtherAtmelChips" rel="nofollow noreferrer">Arduino for other Chips</a></li>
<li><a href="https://learn.sparkfun.com/tutorials/tiny-avr-programmer-hookup-guide/attiny85-use-hints" rel="nofollow noreferrer">Tiny AVR Programmer Hookup Guide</a></li>
<li><a href="https://www.raspberrypi.org/forums/viewtopic.php?f=42&amp;t=76639" rel="nofollow noreferrer">ATtiny85 with Arduino IDE and Gertboard</a></li>
<li><a href="http://spellfoundry.com/sleepy-pi/setting-arduino-ide-raspbian/" rel="nofollow noreferrer">Setting up the Arduino IDE on Raspbian</a></li>
</ul>

<p>Arduino/AVR FR433 libraries:</p>

<ul>
<li><a href="https://github.com/ninjablocks/433Utils" rel="nofollow noreferrer">433Kit is a collection of code and documentation designed to assist you in the connection and usage of RF 433MHz transmit and receive modules to/with your Arduino and Rapberry Pi</a></li>
<li><a href="https://learn.sparkfun.com/tutorials/tiny-avr-programmer-hookup-guide/attiny85-use-hints" rel="nofollow noreferrer">Tiny AVR Programmer Hookup Guide</a></li>
</ul>

<p>Troubleshooting:</p>

<ul>
<li><a href="https://community.particle.io/t/wrong-reading-value-for-dh22-get-stuck-after-running-for-a-while/11271" rel="nofollow noreferrer">Wrong reading value for DH22 &amp; get stuck after running for a while</a></li>
<li><a href="http://forum.arduino.cc/index.php?topic=91569.0" rel="nofollow noreferrer">DHT22 Sensor - sync timeout</a></li>
</ul>
 14918: <p>Thanks to Rob Tillaart, the autor of the Arduino DHT <a href="https://github.com/RobTillaart/Arduino/tree/master/libraries/DHTlib" rel="nofollow">library</a> suggested by @frarugi87 (also thank him), the problem has been solved (see <strong><a href="https://github.com/RobTillaart/Arduino/issues/30" rel="nofollow">this issue</a></strong> for more information).</p>

<p>In my case <strong>to fix the problem</strong> there is only needed to to set a specific value of <code>DHTLIB_TIMEOUT</code> by leaving the definition <code>#define DHTLIB_TIMEOUT 1000</code> in the <code>dht.h</code> file of this library and commenting other definitions written next to it:</p>

<pre><code>// #ifndef F_CPU
#define DHTLIB_TIMEOUT 1000 // should be approx. clock/40000
// #else
// #define DHTLIB_TIMEOUT (F_CPU/40000)
// #endif
</code></pre>

<p>The ATtiny is programmed on 8 MHz. The DHT22 is working at a voltage of 3.3V with a <strong>3K3</strong> resistor.</p>

<p>The cause of the problem may be the way I program the ATtiny85 with old version of Arduino IDE installed in the Raspberry Pi (see comments to the @frarugi87's answer). </p>

<p>Libraries used:</p>

<ul>
<li><a href="https://github.com/RobTillaart/Arduino/tree/master/libraries/DHTlib" rel="nofollow">RobTillaart/Arduino DHT11, 21, 22, 33 library</a></li>
<li><a href="https://github.com/maniacbug/RF24" rel="nofollow">Arduino driver for nRF24L01 http://maniacbug.github.com/RF24</a></li>
</ul>

<p>Here is the final code of the ATtiny85 transmitter and the Raspberry Pi reseiver respectively (<strong>I took the most part of the code from different examples of RF24 libraries and DHT libraries! Excuse me, if the code is not tidy.</strong>).</p>

<p><strong>NRF24Transmitter.ino:</strong></p>

<pre><code>#include &lt;dht.h&gt;
#include &lt;RF24.h&gt;

#define DHT22_PIN 3
#define LONG_DELAY_MS 900000

byte currentNodeAddr[6] = "1Node";  // Address of this node

// Struct for sending measured data
struct Data {
  float temp;  // Temperature value
  float hum;   // Humidity value
  int status;     // DHT22 module status
} data;

RF24 radio(2,2);  // Create instance of RF24 radio object
dht DHT;          // Create instance of DHT22 module object

void setup() {
  // Set up the radio
  radio.begin();
  radio.openWritingPipe(currentNodeAddr);
  radio.stopListening();
}

void loop() {

  unsigned long startMillis = millis();
  while (millis() - startMillis &lt; LONG_DELAY_MS);

  do {
    data.status = DHT.read22(DHT22_PIN);
    data.temp = DHT.temperature;
    data.hum = DHT.humidity;

    if (data.status != DHTLIB_OK) {
      delay(1000);
    }

  } while(data.status != DHTLIB_OK);

  radio.write(&amp;data, sizeof(Data));  // Send data to the Raspberry
}
</code></pre>

<p><strong>Receiver.cpp:</strong></p>

<pre><code>#include &lt;cstdlib&gt;
#include &lt;iostream&gt;
#include &lt;sstream&gt;
#include &lt;string&gt;
#include &lt;unistd.h&gt;
#include &lt;RF24/RF24.h&gt;

using namespace std;

uint8_t addresses[][6] = {"1Node", "2Node", "3Node", "4Node", "5Node"};

// Struct for sending measured data
struct Data 
{
    float temp;  // Temperature value
    float hum;   // Humidity value
    int status;     // DHT22 module status
} data;

RF24 radio(RPI_V2_GPIO_P1_22, RPI_V2_GPIO_P1_24, BCM2835_SPI_SPEED_8MHZ);

int main(int argc, char** argv)
{
    uint8_t currentPipe = 1;
    data.temp = -888;
    data.hum = -888;

    printf("BEGIN: %d\n", (int)radio.begin());

    radio.setAutoAck(1);
    radio.setRetries(15,15);
//  radio.setDataRate(RF24_1MBPS);
//  radio.setPALevel(RF24_PA_MAX);
//  radio.setCRCLength(RF24_CRC_16);

    radio.openReadingPipe(1, addresses[0]);
    radio.openReadingPipe(2, addresses[1]);
    radio.openReadingPipe(3, addresses[2]);
    radio.openReadingPipe(4, addresses[3]);
    radio.openReadingPipe(5, addresses[4]);

    radio.startListening();

    radio.printDetails();

    sleep(1);

    cout &lt;&lt; "Start!" &lt;&lt; endl;

    while(true)
    {
        cout &lt;&lt; "Waiting for data..." &lt;&lt; endl;

        while (radio.available(&amp;currentPipe)) 
        {
            cout &lt;&lt; "Reading: " &lt;&lt; addresses[currentPipe - 1] &lt;&lt; "..." &lt;&lt; endl;

            radio.read(&amp;data, sizeof(Data));

            cout &lt;&lt; "Temp: " &lt;&lt; data.temp &lt;&lt; endl;
            cout &lt;&lt; "Hum: " &lt;&lt; data.hum &lt;&lt; endl;
            cout &lt;&lt; "Status: " &lt;&lt; data.status &lt;&lt; endl;
        }

        sleep(1);
    }   

    return 0;
}
</code></pre>

<p><strong>Here is Makefile to compile the receiver.cpp:</strong></p>

<pre><code>#############################################################################
#
# Makefile for librf24 examples on Raspberry Pi
#
# License: GPL (General Public License)
# Author:  gnulnulf &lt;arco@appeltaart.mine.nu&gt;
# Date:    2013/02/07 (version 1.0)
#
# Description:
# ------------
# use make all and make install to install the examples
# You can change the install directory by editing the prefix line
#
prefix := /usr/local

# Detect the Raspberry Pi by the existence of the bcm_host.h file
BCMLOC=/opt/vc/include/bcm_host.h

ifneq ("$(wildcard $(BCMLOC))","")
# The recommended compiler flags for the Raspberry Pi
CCFLAGS=-Ofast -mfpu=vfp -mfloat-abi=hard -march=armv6zk -mtune=arm1176jzf-s
endif

# define all programs
#PROGRAMS = scanner pingtest gettingstarted
PROGRAMS = receiver #gettingstarted gettingstarted_call_response transfer pingpair_dyn test
SOURCES = ${PROGRAMS:=.cpp}

all: ${PROGRAMS}

${PROGRAMS}: ${SOURCES}
    g++ ${CCFLAGS} -Wall -I../ -lrf24-bcm $@.cpp -o $@

clean:
    rm -rf $(PROGRAMS)

install: all
    receiver -d $(prefix) || mkdir $(prefix)
    receiver -d $(prefix)/bin || mkdir $(prefix)/bin
    for prog in $(PROGRAMS); do \
      install -m 0755 $$prog $(prefix)/bin; \
    done

.PHONY: install
</code></pre>
