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

SAADC Service Characteristic

Not sure if there is already a worked-out example of converting analog to digital data from AIN0 and then updating a characteristic with that data.

I've worked through the available examples progressively: characteristic tutorial, gpio through characteristic, and then separately the saadc example found in SDK 13.1 using nrf52832 DK on Segger.

I found this devzone question where saadc updates a characteristic, but its not in the tutorial format and does not build on progressively to previous examples.

Currently, I'm looking for some help on how to incorporate and call the saadc functions found in the saadc example,

  • saadc_sampling_event_init();
  • saadc_sampling_event_enable();
  • saadc_init();
  • saadc_callback();

from within the nrf5-ble-tutorial-characteristic, and if (or how) time_timeout_handler() is used when samples are added to the buffer.

-thank-you.

Parents
  • The proximity example shows how the battery adc is handled within the main.c, but the tutorial seems to take it one step further and would process (for example) the saadc_event_handler adc_result in the characteristic_update in the our_service.c. Come to think of it, it would be helpful to see how the battery adc and sensor adc could coexist in an updated tutorial (a continuation of tutorials/17/).

Reply
  • The proximity example shows how the battery adc is handled within the main.c, but the tutorial seems to take it one step further and would process (for example) the saadc_event_handler adc_result in the characteristic_update in the our_service.c. Come to think of it, it would be helpful to see how the battery adc and sensor adc could coexist in an updated tutorial (a continuation of tutorials/17/).

Children
No Data
Related