turn an Led on using a NRF24L01

l

transmitter.ino (1.67 KB)

reciever.ino (1.39 KB)

How would you like a doorbell that yells "Nobody at the door!" if the doorbell is not pressed
and "Someone at the door!" if it is pressed, non-stop and back to back?

You try to display each and every sentence of that blubbering on your screen,
but the sender pushes them in faster than you can display them.

Why are you not interested in the outcome of your sends?

Why do you want to send text if you have problems decoding that crap later?
I would send a struct with a triggered flag once a second and additionally when the flag changes.

How unsensibe is reading 45 bytes from a device that has a maximum packet size of 32?
(You are lucky that the library silently adjusts that for you).

What is that delay(3000); good for?

Have a look at this Simple nRF24L01+ Tutorial.

Wireless problems can be very difficult to debug so get the wireless part working on its own before you start adding any other features.

The examples are as simple as I could make them and they have worked for other Forum members. If you get stuck it will be easier to help with code that I am familiar with. Start by getting the first example to work

If you want to turn an LED on and off then send one message when you want it to turn on and a different message when you want it to turn off.

Alternatively you could send an ON message at regular intervals (perhaps 4 times per second) during the period when the LED should be on and send nothing otherwise. The receiver would be programmed to turn off the LED if it did not get an ON message. This system automatically deals with a communication failure.

…R

Honestly I have no understanding for people that don't want help.

Good luck with you projekt.

GMR0527:
Honestly I have no clue what you were just talking about,

I get it u can send a certain msg but I wanted a system that sends a message when the PIR sensor signals someone, then turns off when there’s no motion , and to archive this ,I use the radio to transmit these words meaning I want both to keep listening so it prints on the screen. And that led I was going to exchange for an active buzzer to notify the receive that there was movement via the IF motion detected was printed “

It seems to me that both @Whandall and I have been talking about pretty much exactly the same thing that you say you want to implement. So I don't understand what you don't understand.

Have you tried any of the examples in the link I gave you?

...R

GMR0527:
Honestly I have no clue what you were just talking about, I get it u can send a certain msg but I wanted a system that sends a message when the PIR sensor signals someone, then turns off when there’s no motion , and to archive this ,I use the radio to transmit these words meaning I want both to keep listening so it prints on the screen. And that led I was going to exchange for an active buzzer to notify the receive that there was movement via the IF motion detected was printed “

You really don't need to send the text of the message, a single byte with a value of 0 (while the PIR is not triggered) or 1 (while the PIR is triggered) would be much easier.

Then, on the receiving end, read the byte. If it is 0 print one message (or no message), and if it is 1 then print the other message. Turn the buzzer on/off as required

GMR0527:
Is there any way u can code that , I’m confused but yes that’s basically what I want at this point

I could do it but it would be better if you tried. Have you looked at and tried Robin's examples ?

Start by sending and receiving a single byte. Display what you receive and don't worry about the LDR or changing the value of the byte in the program. Change it in the Tx program, recompile and watch it change in the Rx.

Come back when you have that working or have tried and failed to get it working.

@Robin2

Have a look at this Simple nRF24L01+ Tutorial.

The examples are as simple as I could make them and they have worked for other Forum members. If you get stuck it will be easier to help with code that I am familiar with. Start by getting the first example to work

@UKHeliBob

Have you looked at and tried Robin's examples ?

that's why I like going off by an example then I can learn.

You have been offered an example which has helped many people to learn. If you can get the first example to work, you can adapt it to work with the motion sensor.

Additionally, have you gotten the library examples for the display to work correctly?

Not so much dumb as lazy. Or perhaps stubborn.

GMR0527:
no I don't even know where to start , it looks like jumbled up words and no sense
im sorry if I make it look like im dumb but its the truth I don't understand. I apologize if ur repeating ur selfs but im kind of lost here. :frowning:

Start by trying Robin's examples exactly as they are. No changes needed, not even a need to understand how or why they work.

Have you even done that ?

GMR0527:
but I don't understand the tech words

If you don't tell us the words you are having difficulty understanding we cannot explain them.

...R

UKHeliBob:
You really don't need to send the text of the message, a single byte with a value of 0 (while the PIR is not triggered) or 1 (while the PIR is triggered) would be much easier.

Then, on the receiving end, read the byte. If it is 0 print one message (or no message), and if it is 1 then print the other message. Turn the buzzer on/off as required

This is the best option. Robin2 have given you links to some examples. Very easy to follow