Go Down

Topic: NRF24L01 2.4ghz wireless on arduino (Read 11682 times) previous topic - next topic

rlogiacco

Do you have any news? Does it work as expected? Remember I didn't try the sketches myself....
Please, do not send me personal messages containing forum related questions: I will not answer.

I share my discoveries and thoughts at http://rlogiacco.wordpress.com

josephchrzempiec

hello i haven't tried it yet sorry my wife is sick a year and a half ago she had stomach surgery  so he was not feeling good i will try it tonight when i have a chance but thank you  for it i will post update if worked.

josephchrzempiec

hello i tried your code but having 2 problems with it first one  i just put one transmitter and  and the receiver  have 3 leds on it  okay transmitter on d2 for the red led when i push the button led comes on there is a slight delay i think is normal because going over  the network  then the led comes on but if i let go of the button and try to push it again it doesn't come on i have to wait a few seconds like 5 seconds before i can push it again or sometimes it wont come on at all  and i have to wait for awhile then i can push it again and it comes on  with that delay over the network. Second thing is  i put a second transmitter on how can i set the id for that one to turn on the green led which is on D3 on the receiver?

josephchrzempiec

hello rlogiacco what i did was i found the id number 0 in the first id and there is a second id number  close to the bottom of the sketch so i change the first id number from 0 to 1 and upload the sketch that turn on my turn led  when set at 0 id it turns on my red led  but when i change it and i push the button in id 1 for the blue led it stayed on the led didn't shut off not sure what to do about that? so i hit the reset button on the receiver uno board to turn it off manually and i change the id number on the transmitter to ID 2 and uploaded that turn on my Green led same thing it didn't shut off the led into i manually shut off at the receiver side.  and i change the id to number 3 and that turn on my white led once again didn't shut it off when i release the button so not sure what to do?



rlogiacco

I'm not sure I do understand your description: can you please post your transmitter1, transmitter2 and receiver sketches along with your wiring?
Please, do not send me personal messages containing forum related questions: I will not answer.

I share my discoveries and thoughts at http://rlogiacco.wordpress.com

josephchrzempiec

okay let me explain a little more sorry if you couldn't understand me.

i got 5 so far transmitters all wired up the same  no difference.  first one is transmitterId  0 that turn on the first led of Red i have it when i pushed the button it turned on the red led and when i released it it turned off the led. now second transmitter with button is on transmitterId  1 that on the receiver turns on second led that is green so when pushed the second transmitter button the Green led goes on but when release the button it doesn't go off.  now when i go to the first transmitter set for transmitterId  2 that on the receiver turns on the third led of blue when push the button in  it turns on the forth led blue but when release that button the blue led still remains on doesn't shut off. and forth transmitter same thing white led push button doesn't turn off and fifth one as well i just push today haves a purple led  turns on when button pushed but doesn't shut off only the first led shuts off when button is released. if this doesn't make sense let me know thank you.

josephchrzempiec

hello rlogiacco  that is currently what is happening at the moment.

rlogiacco

In line 52 please change

Code: [Select]

// Turns off all the LEDs
for (int i = 0; i < 5; i++) {
digitalWrite(LEDpins[0], LOW);
}


to

Code: [Select]

// Turns off all the LEDs
for (int i = 0; i < 5; i++) {
digitalWrite(LEDpins[i], LOW);
}


which is actually fixing a typo: I was turning off 5 times the LED on the first pin in the pins array rather than turning off once all the pins in the same array.

That should fix your issue. Not related to RF24 though
Please, do not send me personal messages containing forum related questions: I will not answer.

I share my discoveries and thoughts at http://rlogiacco.wordpress.com

Go Up