I am using the nrf52832 to run multiple tasks and would like it to be able to react to an event from an analog sensor.
I am using the nrf52832 to run multiple tasks and would like it to be able to react to an event from an analog sensor.
Hi,
You can use the COMP peripheral for that. The comparator (COMP) compares an input voltage (VIN+) against a second input voltage or reference voltage (single-ended mode).
Are you using nRF5 SDK or NCS?
In nRF5 SDK you can take a look at the LPCOMP example which demonstrates how to use the low power comparator peripheral.
In NCS there is no dedicated sample using COMP yet but you can take a look at 'modules\hal\nordic\nrfx\drivers\include\nrfx_comp.h' driver and to add to an existing sample.
Best regards,
Marjeris