Welcome to the forum.
Please have a look at the example I posted a while ago for an environmental sensing service. This will show you a couple of tricks that will help you make your sketch work, removing the need for delays and while loops.
https://forum.arduino.cc/t/bluetooth-communications/902610/2
A few things to note about BLE:
- A BLE peripheral application layer does not send data, it updates it characteristics and that is it.
- The central device is responsible for getting the data. It can read/write the data and get notifications when it subscribes to a characteristic.
- As matt_lee_smith said, communication stacks do not like delay().
About FFT, to get a good FFT result you need equidistant sampling. That will not work with using delay or millis(). Luckily the nRF52840 is awesome at doing this on its own. You will need to do some programming. Have a look at the examples I posted in the following thread.
https://forum.arduino.cc/t/increase-the-adc-sample-rate/701813
They use a hardware timer and the PPI system to trigger the ADC automatically and tell you when a sample is ready. You will need to adapt this for your use case and integrate it with BLE. The functions are independent and most of it runs in hardware after the setup.
One last tip. Avoid programming in 3 languages. C/C++ and English is enough. I am not a native English speaker and after a little while you will be happy you stopped inserting another cause of confusion.
And it helps other people understand your code better.