Im using PCA10040 nrf52832 to measure light intensity with photodiode,
im using SAADC and SPI example to measure values but im not able to see any changes on UART as light intensity changes.
please suggest.
Im using PCA10040 nrf52832 to measure light intensity with photodiode,
im using SAADC and SPI example to measure values but im not able to see any changes on UART as light intensity changes.
please suggest.
im using SAADC and SPI example to measure values
What has SPI got to do with it?
Always start simple - so get rid of the added, unnecessary complication of SPI!
Start with the SAADC example:
im not able to see any changes on UART as light intensity changes
Are there any changes in the voltage at the analogue input pin?
AN0 pin is used
Are you sure you have the correct pin?
See: https://devzone.nordicsemi.com/f/nordic-q-a/47914/saadc-example-problems/189911#189911
Which links to: https://devzone.nordicsemi.com/f/nordic-q-a/46819/problems-with-saadc/184714#184714
this what im getting values.
im using SPI because as whatever using amplifier supports SPI protocol, which is mainly used for ADC operation and then data sent to nrf52832 of AIN0 pin.
You never mentioned any amplifier - we are not mind readers!
But, again, start simple!
Start with the SAADC example, to learn to use the SAADC on its own.
Then use an SPI example, to learn to use the SPI on its own.
Then - once you have understood both parts and have them working well - bring the two together.
Note that a photo-transistor should give you a usable voltage without the need of an amplifier.
Digital light level sensor are also available
Still im getting same values i didnt make any changes in code just using AIN0 pin channel 0. Connected AIN0 (P0.02) to VDD.
Tried SAADC example only but still no changes.
Tried SAADC example only but still no changes.