I wonder if the problem is caused by the sensor interfering with the SPI communication with the nRF24 - I'm not familiar with the DallasTemperature library or hardware.
Separately, your Tx program is sending data as fast as it can. I suggest you only send data about once every 100 millisecs (or much less often if the application would be satisfied) - otherwise you are unnecessarily overcrowding the airwaves for other 2.4GHz applicances.
Robin2:
I wonder if the problem is caused by the sensor interfering with the SPI communication with the nRF24 - I'm not familiar with the DallasTemperature library or hardware.
Separately, your Tx program is sending data as fast as it can. I suggest you only send data about once every 100 millisecs (or much less often if the application would be satisfied) - otherwise you are unnecessarily overcrowding the airwaves for other 2.4GHz applicances.
I was actually going to try the same thing in the next couple of days. I currenlty have a setup with an ATTiny85, RF24 breakout and a DHT11/DHT22 as the temp sensor and got this to work.
I have some ds18b20 as well that I was going to try next. For your setup, if you commented out the RF24 logic, and just printed the temp to Serial does it work? I'm curious to see if the loop is stuck at reading the sensor.
I just tried on my setup, and I'm able to read and send the data from the DS18b20 sensor over the RF24 module.
Add some serial prints after reading the temperature to make sure it's actually getting a temperature and not just blocking there. Some implementation of the ds18b20 library will block there until the data is read. Teh lobrary I used for the ds18b20 is from here
and the OneWire library from Jim Studt, and Tom Pollard.
This is a non blocking implementation. Look at his example (simple example).
And as others pointed out, your current code isn't sending the sensor data. You are writing 1 byte from your pesan array of int (4 bytes depending on what device you are using).
fauzian:
sorry for not more expalined that before.
I thought your comment at the bottom of Reply #10 referred to a revised version of your program that was taking account of the advice in the earlier Replies.
Please post the latest version of your program and tell us in detail what it actually does and what you want it to do that is different.