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

nrf9160 analog input pins

I got an example that uses PO.13 for analogue input.  It does this by referencing it as ADC_0.  That seemed to work OK when I hooked up to PO.13 on the nrf9160-DK

Then I changed the code to reference ADC_1 and hooked up P0.14.  This did not work and I'm note sure why.

Here's the relevant code -I changed 3 lines:

#define ADC_DEV "ADC_1"
#define ADC_1ST_CHANNEL_ID 1
#define ADC_1ST_CHANNEL_INPUT SAADC_CH_PSELP_PSELP_AnalogInput1

adc_dev = device_get_binding(ADC_DEV);

Error getting ADC_1 failed

Any suggestions please.  Perhaps something else is not defined?

Parents Reply Children
Related