Hi.
I'm using nrf52832 with SDK-17, and the ESB example (esb_tx and esb_rx)
I'm not much experience in nrf development recently I have a project related to ESB to transmit and receiver data, here is my problem and some questions.
The payload of ESb transmitter and receiver is buffer is shared as when the after Ack occur ?
Like I make a logic to send different intergers on button press so I use a payload which is initialized at top
//static nrf_esb_payload_t tx_payload = NRF_ESB_CREATE_PAYLOAD(0, 0x01, 0x00, 0x00, 0x00, 0x11, 0x00, 0x00, 0x00); static nrf_esb_payload_t tx_payload = NRF_ESB_CREATE_PAYLOAD(0, 1, 2,3,4,5); static nrf_esb_payload_t tx_payload;
i try to send a specific data on button press I make a logic for button using button handler when ever I send the data using the function below the data is send nicely
if (nrf_esb_write_payload(&tx_payload) == NRF_SUCCESS)
{
static nrf_esb_payload_t tx_payload = NRF_ESB_CREATE_PAYLOAD(7,8);
tx_payload.data[1]; ///the index 1
NRF_LOG_INFO("Transmitting packet %d", tx_payload.data[1]);
}
else
{
NRF_LOG_INFO("Sending packet failed");
}
The problem on the Receiver side !!
how can I get only the exact number on the receiver side in the buffer the whole buffer I don't wanna share?
Reciever side to get the payload.. I get the payload but not the way i want please help me about this
if (nrf_esb_read_rx_payload(&rx_payload) == NRF_SUCCESS)
{
// NRF_LOG_INFO("Receiving pa
if(rx_payload.data[1] == 7)
{
NRF_LOG_INFO("Receiving packet 6");
NRF_LOG_INFO("Receiving packet: %d", rx_payload.data[0]);
}
on the Reciever side, I don't want the buffer index to be the same as cause it does not make my logic right...
i hope the problem is justified well if someone have question asked me about it ,