so I just started experimenting with the Adafruit Feather nRF52840 board and have set up a working BLE connection between the board and another device.
Usually, everything works fine by sending data from the other device to the nRF52840, but sometimes, if I send 2 packets at the exact same time, the setWriteCallback is only registering one of them.
Is there a way I can work around this issue?
This is how I set up my callback in code:
void charact_write_callback(uint16_t conn_hdl, BLECharacteristic* chr, uint8_t *data, uint16_t len)
{
if(data[0] == 2){
Serial.print(data[1] == 0 ? "Left" : "Right");
Serial.println(" Hand Touch occured");
}
}
When both hands are actually touching and sending data to the device, this callback only receives one.
Thanks in advance and Greetings