I am looking to create a wireless weather station. I will be using an Arduino Mega as the main / base station and 2 Arduino Nano's as the 2 remote stations, all with NRF24L01+ transceivers. Station 1 will send data from 2 sensors and station 2 will send data from 4 sensors. I have found posts on weather stations using 2 NRF24L01+ but I am having trouble finding any using 3. I am looking for the simplest code for the 2 transmitters and 1 receiver to start with, I guess the receiver (Mega) should query the Nano's for the data probably every 15 minutes.
Thank You
There's no simple code for that project.
Split it down into small pieces.
First test sketch would be to read the various sensors.
Second test sketch would be to make 2 boards communicate using NRF24L01.
Show what You have managed so far. Code, schematics and an overview of the total system.
It seems like you are looking for almost ready to run code. You said that you found some using 2. Actually, this means you are reluctant to examine and analyze that code to understand how it could be augmented from 2 to 3. If you don't want to do that, your choices are limited.
- copy an existing project exactly, and try to be satisfied with it
- pay someone to do it for you
Really, almost anyone can learn to understand and write original code, or modify it. It just takes time and patience. The main purpose of this forum is to support that kind of effort. Given enough time, it is certainly feasible for a beginner to become familiar enough with a well written program, to make the modifications you require. That is because although things seem complex at first, most programming is fairly simple. After all, the computer itself is a really stupid brain, doesn't even have a mind. It's just an incredibly fast idiot.
Thank You,
I did start out with small pieces with 1 remote station talking the receiver and added my sensors (this works). This was from years ago and I kind of left it for quite a while, now I want to update it by adding the second station. But from reading other posts it seems the receiver should be asking the transmitters for the data so there is no conflict between the 2 "transmitters", so is that correct? How do I get the "base" station(Mega) to ask the remote stations for data?
Thanks
The answer is in the transceiver library documentation and examples. You may have to implement your own polling strategy but I believe you've answered your own question. To "ask" for a transmission, all you need to do is send a code that the remote will recognize as a request to send. It's hard to imagine how that could be very difficult.
If you have code that you want help to modify, please post it. Then we can talk specifics, not vague generalities.
Hello cxplorrken
My recommendation is to use HC12 radio modules.
Have a nice day and enjoy coding in C++.
Дайте миру шанс!
I think you have to make your project by combining the methods shown in the two links below:
If you ever consider re designing your weather station with an ESP-32, you can take a look at this:
Using 3 should work the same, shouldn't it? When two work, the master asks the slave to send. When you have two slaves, the master ask the first slave, then the second, then the first etc. The calls should differ from each other, right? I mean, you could have lots of masters and slaves in the neighbourhood with their own ID:s (the structure of which I know nothing). So, if you only have one slave, there's still something that makes the two units recognise each other, isn't there?
This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.