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

Why there is no easy API for analog input of nRF52 (SAADC)?

I am once again frustrated with nRF5 API's. Getting a value from analog input pin is that simple with Arduino API's:

int sensorValue = analogRead(A0);

That's all you mostly need. But guess how much code you need with Nordic Semiconductor's SAADC API to achieve the same result? The main program of the SAADC example code provided with SDK12.0.0 has 163 lines (comments included).

What's the point, where is the common sense? Of course, SAADC is much more than just a single conversion, but could you please provide also the most simple and most needed APIs!

I am now struggling to get the SAADC to work for just measuring battery voltage, and again, I don't know what goes wrong in all those settings...

Related