Can anyone help me with an idea.. I want to make an Arduino Duemilanove random number genorator that will show up on 2 7-segments when I press a button. Any code suggestions, or help will be nice and if I ever make a instructable of it I will thank you all. Thanks!?
I want help with a random # generator that will appear on 2 LED 7-segments, and will activate on the push of a button.

active| newest | oldestRAND FUNCTION.This can be expressed:

=INT(RAND()*(b-a)+a)_{where b is the larger and a is the smaller}If you wanted a random 7 digit number your formula would look like:

=INT(RAND()*(9999999-999999)+999999)To make 2 sets of numbers simply copy the formula over to another cell. To compute a new number just hit the cell again and a new number will be generated.

Just throwing this out as an alternative, or possibly something to hold you over until you finish sorting out an Arduino.

Hope this helps!

Use this instead. Microsoft pseudorandom number generators make me sad.

http://www.defcon.org/images/defcon-17/dc-17-presentations/defcon-17-sean_boyce-quantum_random.pdf

I can confirm it works. Hope you're comfortable handling radioactives.

I wrote the code in assembly for AVR, should be easy to convert to arduino using the flowchart in the presentation. Bother me if you need source.

I've already done the most ridiculous parts of the statistical work, but you should test 25 megabits of output or so just to make sure it's running right using this tool:

http://csrc.nist.gov/groups/ST/toolkit/rng/index.html

I'm not familiar with Arduino coding but you could simulate this with something like the following (written in a pseudo-code).

You would need to set a seed number in a 16 bit register first.

The output would be the 16 bit value of the register.

MAIN :

Logical shift left register

Bit 0 = (Bit 15 XOR Bit 6) XOR (Bit 12 XOR Bit 4)

Read register

goto MAIN

This would give you a series of pseudo-random numbers. If this was full-sequence it would repeat after 65536 shifts, but my randomly chosen feedback points would possibly fall into a shorter sequence.

(On a Picaxe you would use the RANDOM command, which would give a 16 bit PRN from an initial seed value each time it was called.)

You need something to add real uncertainty to the system. Classic methods use noise generated in a transistor.

Here's a classic circuit and process.

http://www.cryogenius.com/hardware/rng/