How to send a Bluefruit UART message that does not end with a null character
To send a Bluetooth Low Energy (BLE) UART message that does not end with a null character (i.e. "\0"), create a char* from your string and send the message using the bleuart.write function.
The following project assumes that you have setup your Arduino project to work with an Adafruit nRF52 Bluefruit LE chip.
To learn how to set this up, consult the guide below.
After setting up the Adafruit nRF52 Bluefruit LE, you can send a message that ends with a null character use code similar to that below.
This code requires you to convert a string to a char array (char *), this can be done using the utility below.
As noted in the code above, this message breaks the default 20 byte Maximum Transmission Unit (MTU) and requires you to change the Bluefruit's MTU to allow for it.
To learn how to do this, consult the tutorial linked below.
Looking to send a UART message that terminates with a null character ?
To learn how to send a UART message using an Adafruit Bluefruit nRF52 LE that terminates with a null character, consult the tutorial below.