Hi I am using the example code here https://github.com/NordicPlayground/nRF52-ADC-examples/tree/master/nrfx_saadc_simple_low_power_app_timer_multichannel_oversample to use the ADC to read the value of a photoresistor.
Everything works fine when I use a pull-down resistor of 10K and attach A1 on GND and then connect the other end of the photoresistor to 5V. The adc receives values between 1800-2500 depending whether the sensor is covered.
However, when I use the VDD pin (3.3V instead of 5V) the adc value is stuck at 3300 and does not change if I cover the resistor. Do I need to change the reference voltage value somewhere in the code? Or do I need to switch the pulldown resistor to a higher/lower resistance?
I need to use VDD and 3.3V since I will eventually be powering an external board off of a Lipo.
Also not sure if this is important but the photoresistor gets up to 300k ohms when fully covered