Arduino Forum

Products => MKR Boards => MKRZero => Topic started by: JesterJ on Feb 10, 2018, 06:05 pm

Title: analogRead operating as an 8 bit A/D, how to get it to operate as a 12 bit?
Post by: JesterJ on Feb 10, 2018, 06:05 pm
I purchased the MKRZERO specifically because it has 12 bits A/D's, however the values returned by analogRead are 8 bit values.


How does one go about getting the A/D to operate as a 12 bits A/D and return values 0-4095, instead of 0-1023?
Title: Re: analogRead operating as an 8 bit A/D, how to get it to operate as a 12 bit?
Post by: ltheoret on Feb 12, 2018, 02:39 am
Hi jester

Try analogReadResolution(12); in setup() to change the read resolution.

ltheoret