This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

How to run a combined projects of SAADC and BLE_APP_HRS

Dear all,

sorry for asking a very beginner's question but I'm really a beginner and want to understand what I'm doing :)

What I have:

  • nrf52 DK
  • nrf SDK11.0.0
  • GCC with Eclipse
  • PCA10040

What I want to do: I want to read out an analog input channel of the nrf52 DK and transmit the data to my IPhone (nrf Toolbox app) via BLE

What I did:

I used the SAADC sample code and the BLE_APP_HRS code. I tried to combine both projects. I included all .c and .h and all the functions in main.c of the SAADC sample into the BLE_APP_HRS makefile and main.c. Everything works and I don't get errors.

Problem: If I remove saadc_sampling_event_init(); and saadc_sampling_event_enable(); the LED1 of nrf52 DK is blinking and if I connect it with my phone it constantly shines. However then I cannot read the analog input. And if I put those lines again into main.c of the BLE_APP_HRS the LED1 is not even blinking and I cannot connect to the device as its name doesn't appear.

Hope that you can help me.

THX!

Related