Robin2:
If I re-format your text like this, it makes more sense - stream-of-consciousness prose is very hard to understand, especially for techincal matters.
That seems to suggest you are planning to have each slave send data whenever there is new data to send.
yes correct what are saying is exactly what i want to do
Robin2:
And if that is correct I don't understand why you are asking the question in your final paragraph. Why are you thinking it might be necessary to open a pipe for a time period? Why wouldn't the master be listening all the time?...R
as in the simpleRx example in the setup function we have used
radio.openReadingPipe(1, thisSlaveAddress);
as the slave starts to listen when we use above line so i thought of there will be a way to stop it so the slave will be in ideal mode and doesn't do anything
but as i have gone through
http://tmrh20.github.io/RF24/RF24_8cpp_source.html#l00696
There is a power down mode in it and i guess this will help to put the nrf24l01 in sleep mode and wakeup it again by using code of the MCU
void RF24::stopListening(void)
728 {
729 ce(LOW);
730
731 delayMicroseconds(txDelay);
732
733 if(read_register(FEATURE) & _BV(EN_ACK_PAY)){
734 delayMicroseconds(txDelay); //200
735 flush_tx();
736 }
737 //flush_rx();
738 write_register(NRF_CONFIG, ( read_register(NRF_CONFIG) ) & ~_BV(PRIM_RX) );
739
740 #if defined (RF24_TINY) || defined (LITTLEWIRE)
741 // for 3 pins solution TX mode is only left with additonal powerDown/powerUp cycle
742 if (ce_pin == csn_pin) {
743 powerDown();
744 powerUp();
745 }
746 #endif
747 write_register(EN_RXADDR,read_register(EN_RXADDR) | _BV(pgm_read_byte(&child_pipe_enable[0]))); // Enable RX on pipe0
748
749 //delayMicroseconds(100);
750
751 }
752
753 /****************************************************************************/
754
755 void RF24::powerDown(void)
756 {
757 ce(LOW); // Guarantee CE is low on powerDown
758 write_register(NRF_CONFIG,read_register(NRF_CONFIG) & ~_BV(PWR_UP));
759 }
760
761 /****************************************************************************/
762
763 //Power up now. Radio will not power down unless instructed by MCU for config changes etc.
764 void RF24::powerUp(void)
765 {
766 uint8_t cfg = read_register(NRF_CONFIG);
767
768 // if not powered up then power up and wait for the radio to initialize
769 if (!(cfg & _BV(PWR_UP))){
770 write_register(NRF_CONFIG, cfg | _BV(PWR_UP));
771
772 // For nRF24L01+ to go from power down mode to TX or RX mode it must first pass through stand-by mode.
773 // There must be a delay of Tpd2stby (see Table 16.) after the nRF24L01+ leaves power down mode before
774 // the CEis set high. - Tpd2stby can be up to 5ms per the 1.0 datasheet
775 delay(5);
776 }
777 }