I'm doing a hobby project and can't seem to get it working. Aim of the project is to transmit temperature values from a DS18B20 using an Arduino Uno and NRF24l01. The receiver should receive temperature values from transmitter and display. Already worked on the code and the partial code is below.
TX part
#include <OneWire.h>
#include <DallasTemperature.h>
#include <SPI.h>
#include <nRF24L01.h>
#include <RF24.h>
#define ONE_WIRE_BUS 2
#define CE_PIN 9
#define CSN_PIN 10
#define ONE_WIRE_BUS 2
RF24 radio(CE_PIN, CSN_PIN);
//RF24Network network(radio);
const uint16_t this_node = 1;
const uint16_t other_node = 0;
const unsigned long interval = 2000; //ms
const uint64_t pipes[2] = { 0xF0F0F0F0E1LL, 0xF0F0F0F0D2LL };
OneWire oneWire(ONE_WIRE_BUS);
DallasTemperature sensors(&oneWire);
void setup(void)
{
[login to view URL](9600);
[login to view URL]();
[login to view URL](127);
[login to view URL]("Dallas Temperature IC Control Library Demo");
// [login to view URL](80, this_node);
[login to view URL](pipes[1]);
[login to view URL](1, pipes[0]);
[login to view URL]();
}
void loop(void)
{
[login to view URL](" Requesting temperatures...");
[login to view URL](); // Send the command to get temperatures
[login to view URL]("DONE");
float currentTemp = [login to view URL](0);
//RF24NetworkHeader header(other_node);
//bool ok = [login to view URL](header, ¤tTemp, sizeof(currentTemp));
[login to view URL]();
[login to view URL]( ¤tTemp, sizeof(currentTemp) );
[login to view URL]("Temperature for Device 1 is: ");
[login to view URL](currentTemp);
}
RX part
#include <SPI.h>
#include <nRF24L01.h>
#include <RF24.h>
#define CE_PIN 9
#define CSN_PIN 10
RF24 radio(CE_PIN, CSN_PIN);
//RF24Network network(radio);
const uint16_t this_node = 1;
const uint16_t other_node = 0;
const unsigned long interval = 2000; //ms
const uint64_t pipes[2] = { 0xF0F0F0F0E1LL, 0xF0F0F0F0D2LL };
void setup(void)
{
[login to view URL](9600);
delay(1000);
[login to view URL]();
[login to view URL](127);
[login to view URL]("Nrf24L01 Receiver ");
//[login to view URL](80, this_node);
[login to view URL](pipes[0]);
[login to view URL](1, pipes[1]);
[login to view URL]();;
}
void loop(void)
{
float currentTemp;
if ( [login to view URL]() )
{
{
bool done = false;
while (!done)
{
//RF24NetworkHeader header;
//bool ok = [login to view URL](header, ¤tTemp, sizeof(currentTemp));
done = [login to view URL]( ¤tTemp, sizeof(currentTemp) );
[login to view URL]("Temperature for Device 1 is: ");
[login to view URL](currentTemp);
}
}
}
else
[login to view URL]("radio not found");
}
Transmitter is working perfectly but I'm not receiving any data at the receiver. The following websites were used to connect the circuit
[login to view URL]
[login to view URL]
Hello! I already have used DS18B20 with an Arduino uno and it worked really well for me. But I think your problem here is with the transceiver. So I can test it with an NRF24l01 and tell you what the problem is. Since this is my first bid I will return you the 5$ I get from this. :) So just contact me if you feel I'm the right one.
Cheers!
$10 USD in 1 day
5.0 (5 reviews)
2.7
2.7
11 freelancers are bidding on average $24 USD for this job
Hello.
I would like help you, but I will have the free time after completion of the current project. (It's 5:AM here :-)). Will finish it in Sunday.
So if you can wait - let's speak in Monday
With best regards.
Maxim
hi i am an electrical engineer. i have strong skill set related to Arduino development. i have worked on Nrf24L01. i can do this project for you. let me know if you are interested and we will discuss the details.
Good day! I have a similar project to yours with the use of NRF24L01 with Arduino. We have similar problems. At first I wasnt able to transmit or receive anything from the NRF24L01 but after careful testing and experimentation I was able to transmit when I touch the antenna part. So as a conclusion, I taped a foil on the antenna part of the NRF24L01(both tx and rx) and it was able to work. I hope this would help. but i can also help you more given the opportunity :)
Thank You and have a good day! :D
Hello, i can help you get your project working. I have understood your project and it does not sound complicated for me to do. Would highly apreciate if you gave me the chance to work with you. Thank you