I am currently development an app based on the example from the experimental folder using a NRF DK52 as a relay between a central and multiple peripherals.
The app should now react on the press of a button from an external device. The device is built like that - for whatever reason the unpressed button is at voltage 2.7V whereas when pressed falls down to 1.2V. The way the device works is out of my control. Because of the high lower value I was told I cannot use a digital input as the maximum 0 value would be recognized at 0.8V.
Therefore I now think about using ADC/SAADC to read the voltage continously and act when the read values are in the range that indicate the button was pressed.
I was looking at the peripheral/saadc example and it worked quite well so far. But then I read that it is not recommended to perform SAADC measurements while BLE RF is happening at the same time. Also SAADC measurements seem to be delayed or in general slower when BLE is active?
What is your recommendation to perform that task? Should I use plain ADC or SAADC? I believe in order to recognize the button press accurately my sampling interval should not be much slower than every 100ms? Whats the best practice here?