Activate oversample in Arduino IDE for nrf52832

CSChris gravatar image

asked 2017-08-14 16:35:03 +0100


do I have a chance to activate oversample for an ADC by using Arduine IDE?

Best regards, Christian

edit retag flag offensive close delete report spam



See my answer in your previous question. You will have to modify the RBL Arduino library.

Jørgen Holmefjord ( 2017-08-14 17:10:46 +0100 )editconvert to answer

Hi Jørgen, thanks for your answer. Do you have any hint on examplary code? Maybe with sandeepmistry's libraries? https://github.com/sandeepmistry/ardu...

BR, Christian

Christian ( 2017-08-14 22:26:42 +0100 )editconvert to answer

1 answer

Sort by » oldest newest most voted
joh2 gravatar image

answered 2017-08-15 08:23:05 +0100


Something like this should work (based on the RedBear library):



You can then set oversampling using analogReadOversample(uint16_t oversample).

(I have not tested the code, so please let me know if there are any errors)

Best regards,


edit flag offensive delete publish link more



I have taken your code and put it into mine. It seems to work. With a resolution of 14 bit and 4x Oversampling the noise is cut to half. But it is still a very high noise. For higher oversampling rates the reading hardly gets better. Is any further trick for less noise available?

Best regards, Christian

Christian ( 2017-08-15 11:33:35 +0100 )editconvert to answer

Please have a look at this answer from the SAADC designer.

Jørgen Holmefjord ( 2017-08-15 11:38:11 +0100 )editconvert to answer

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer. Do not ask a new question or reply to an answer here.

[hide preview]

User menu

    or sign up

Recent questions

Question Tools

1 follower


Asked: 2017-08-14 16:35:03 +0100

Seen: 69 times

Last updated: aug. 15