Hey,
I have two nrf52 development board. One is PRX, one is PTX. I try to realize the scenario that: PTX transmits a number like "100", PRX receives this data "100" and plus "1". Now data is "101" at the PRX side. And PRX transmits "101" to PTX as a response. Finally, PTX receives the data "101". The example that I try to do is a basic ping-pong mechanism.
- Is there anyone did an example like this?
- How to change transceiver mode in order to provide this types of mechanism dynamically?
--Edit--
I realize my question is a bit general. If I tell my issue as more practically, I can not change nrf52832 ESB mode in the loop. Either PRX or PTX could be received and transmitted data at the same time in my desired example. I guess nrf_esb_start_rx
, nrf_esb_stop_rx
,nrf_esb_start_tx
,nrf_esb_init
functions provide this functionality. But, when i use nrf_esb_start_rx
, nrf_esb_stop_rx
functions in while(true){}
loop, the program is totally collapse (nrf52832 resets repeatedly). How can I solve this problem?
Thank you!