Random number generation

https://www.tutorialspoint.com/arduino/arduino_random_numbers.htm

I'm looking to create a function for random numbers similar to the link above.

Is there anything in the hardware that would help produce a random seed?

Mark O'Donovan
Mark O'Donovan
29
| 0 0 0
Asked on 3/15/19, 5:19 PM
0
vote
36 Views

Hi, i did a quick search in the SAM D21 datasheet and i don't find any reference to hardware random generator. 

Assuming you're on the INDIO D21G, you could use for randomSeed() the MCU analog pins A11, A12, A13 as they are not used and appear to be floating a little bit. The 4 analog input channels are not a good source as far as i can see.

Tom
Tom
5375
| 0 0 1
Answered on 3/16/19, 2:00 AM
1
vote

Your answer

Please try to give a substantial answer. If you wanted to comment on the question or answer, just use the commenting tool. Please remember that you can always revise your answers - no need to answer the same question twice. Also, please don't forget to vote - it really helps to select the best questions and answers!

Ask a Question

Keep Informed

About This Forum

This community is for professionals and enthusiasts of our products and services.

Read Guidelines

Question tools

54 follower(s)

Stats

Asked: 3/15/19, 5:19 PM
Seen: 36 times
Last updated: 3/16/19, 2:02 AM