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

data from analog device ir sensor

Hi ...

how to get the data from analog sensor and pass via ble app

Thanks&Regards 

pspavi

Parents Reply
  • Your setup looks OK but the values you're reading are floating a lot, especially if you tried connecting the P0.02 to ground and it gave you the values you posted below. What is the max output voltage of your IR sensor, is it possible you've blown that analog input pin?

    Try disconnecting the IR-sensor, changing NRF_SAADC_INPUT_AIN0 to NRF_SAADC_INPUT_AIN1 in the saadc_init function. This changes the analog-pin which is being sampled to P.03. Connect P.03 to GND and you should get values close to 0, connect P.03 to VDD and you should get values around 850. 

    I just reproduced this example on my own DK and it's working fine so if you're still getting strange values you're probably dealing with a hardware issue. 

Children
Related