Picture of Generate Random Number using Arduino

A random number generation is very important in computing devices which helps them to do task in random manner. The applications of random number generation can be found in shuffling the audio files in an audio player, in almost all kind of digital games, generating passwords etc.There are so many algorithms which can generate the random numbers. The random number generating algorithms differ from other algorithms in an interesting way; they actually reads a random number from the hardware like the noise from the unconnected pins and then apply some calculations on it to generate a number which is inside a specified range.

This particular project explains how to generate a random number with the help of an Arduino board. The Arduino is an easy prototyping platform which is popular among both the hobbyist and experts due to its simplicity, ability and also due to the help available from the internet. The Arduino board is basically an AVR based board including all the required hardware for the microcontroller to function properly and also is flashed with the Arduino boot-loader. All the Arduino boards are compatible with the Arduino IDE which helps to compile the code and to program the board.

killertoffy7 months ago

This is a very weak random number generator.

There's no garantee that an analog input would give you random.
It can easy generate all the same values.
(Even worst when someone tries to influence the generator by connecting something on the analog input)

The correct way to do this is either use a noise source (like a zener diode) or better use quantum mechanics effects between two clocks.

That is you use two different clock sources and you sample one of the clock with the other.

If you do it long enough, you will end up with totally unpredictable noise. (that is cryptographic quality)
Using an arduino, you have the mcu main clock and the watchdog RC internal clock that can be used for that purpose.

gweeds2 years ago
I agree with osgeld, Awesome breadboard layout. I have a few handy pinned helpers like that as well.
I can see you pinned your LCD.

How did you do it?

Have you seen my Instructable Pinning Liquid Crystal Displays?

osgeld2 years ago
smooth breadboard layout, totally going to steal that