r/ArduinoProjects • • May 14 '22

Random Number Generator with Random Animations

246 Upvotes

24 comments sorted by

6

u/WhotheHellkn0ws May 14 '22

How did you make the random number generator?

4

u/chummiestbike May 14 '22

Like the program? Arduino Has a function for producing random numbers.

0

u/[deleted] May 14 '22

[deleted]

5

u/chummiestbike May 14 '22

Not necessary for a decorative application.

0

u/[deleted] May 14 '22

[deleted]

1

u/0hellow May 14 '22

How do you generate random numbers? The best I’ve found is to read a floating analog input, but I still run into issues, and have resorted to reading multiple floating inputs.

Any tips?

3

u/chummiestbike May 14 '22

It's quite simple. val = random(n) where n is your max value if i remember. No need for fancy code. Just a single line. Hope this helps!

2

u/0hellow May 15 '22

Your are totally correct! I was referring to randomizing the seed, I really should have specified.

I have a little screens that generates little drawings, and I wanted to randomize it for each time it was turned back on, but because the seed for the random() wasn’t changing enough, I ended with the same drawings occasionally.

5

u/chpa435566 May 14 '22

Nice. Where did you get the nixie Tube from?

11

u/chummiestbike May 14 '22

I order them on ebay usually. This is also technically not a nixie tube. It's called a vacuum flourescent display or VFD in case you want to find yourself some.

3

u/chpa435566 May 14 '22

Thank you.

2

u/TheUnrealCanadian May 15 '22

Where did you get those tubes from??

1

u/chummiestbike May 15 '22

Ebay usually. Idk what their availability is. Most of them come from ukraine :(

2

u/pablas May 15 '22

Is that a standard 7 segment LCD in glass tube? What's the point of this, just for the looks of nixie?

3

u/chummiestbike May 15 '22

It's a Vacuum Flourescent Display. They are vacuum tubes that are used for number displays. They are a sort of more modern version of nixie tubes.

5

u/Itaintall May 14 '22

This is my mind generating random ideas for projects.

1

u/[deleted] May 14 '22

Is it truly random?

3

u/chummiestbike May 14 '22

No. I doubt it.

1

u/Bladebot140 May 15 '22

Steins Gate has chosen!

2

u/chummiestbike May 15 '22

I considered making a divergence meter but those big nixie tubes cost a lot of dollars. Didn't feel like a justified use of scarce components.

1

u/Bladebot140 May 15 '22

That’s fair, just make sure you know when you jump to a new timeline.

1

u/[deleted] May 14 '22

[removed] — view removed comment

1

u/chummiestbike May 14 '22

I used the arduino function for generating random numbers between 1 and 8. Each time it chose a number it would select a segment or the decimal.

1

u/VOIDPCB May 14 '22

1

u/chummiestbike May 14 '22

That would be absolute overkill for my prospective desk toy, but thanks for giving me something to strive for.

1

u/0hellow May 14 '22

Lol wtf. I’m sure it sounds absolutely amazing haha