NOBODY can solve this - Generating random numbers on an ATmega328p

NOBODY can solve this - Generating random numbers on an ATmega328p

Sine Lab

1 год назад

8,871 Просмотров

Ссылки и html тэги не поддерживаются


Комментарии:

@xzddakfdmiug5832
@xzddakfdmiug5832 - 24.11.2022 18:16

Another excellent video!

Ответить
@Scyth3934
@Scyth3934 - 24.11.2022 19:58

Well made as always!

Ответить
@Nepidemicofmannequins
@Nepidemicofmannequins - 01.02.2023 20:00

🤎💙💚💜❤️

Ответить
@jkmelri
@jkmelri - 03.02.2023 02:06

awesomesauce!

Ответить
@cognisent_
@cognisent_ - 04.02.2023 22:22

This is super good and so cool that you showed a practical example of an entropy source. My favorite example is the Cloudflare lava lamps 💡.

Ответить
@WilliamEllison
@WilliamEllison - 06.02.2023 00:13

Somebody help this kid out.

Here is an example of how to generate a random number between 0 and 10:

int randomNumber = random(10);

If you need truly random numbers, you can use the "noise()" function in conjunction with an analog input, such as a photoresistor, to generate random numbers based on environmental noise. Here is an example of how to generate a random number between 0 and 10 using the "noise()" function:

int randomNumber = noise(analogRead(A0)) % 10;

Keep in mind that the quality of random numbers generated using this method depends on the quality of the analog input used.

Ответить
@alejandrorivera478
@alejandrorivera478 - 06.02.2023 19:14

Everytime u get to say something, u breath, it is not an issue but as a suggestion, u should look out for that. (Sounds kinda weird, but my point is that for each sentence, we get to hear u taking a fast breath)

Ответить
@deelowe3
@deelowe3 - 08.02.2023 08:15

Why didn’t you use the random and noise functions? Generating a random number on micros is actually easier than a pc if you’re willing to add some hardware. It’s pretty easy to come up with a seed that’s impossible to guess if you leverage inputs with high entropy. For example, a well calibrated photo resistor in front of a lava lamp.

Ответить
@dlbiggins
@dlbiggins - 11.02.2023 01:15

"Anyone who considers arithmetic methods of generating random digits is, of course, in a state of sin"

John Von Neumann

Ответить
@chaosordeal294
@chaosordeal294 - 01.03.2023 19:59

"Why else would we create coins?" No reason, other than to flip them. Coins aren't used for anything else.

Ответить
@ironsm4sh
@ironsm4sh - 01.03.2023 20:39

The way GPU shaders generate "random" numbers is also very interesting.

Ответить
@FelixMoBu
@FelixMoBu - 13.03.2023 00:58

Stumbled across this video, never heard of CLG bevore but it probably solved a >5 years old problem of mine. big THANKS!

Ответить
@pfb3264
@pfb3264 - 23.03.2023 10:46

I used A0 input which was floating in the air and read the last digit on that port ADC value to be the random number for electronic dice with large led strips to create the 7 segment display with slow down feature :)

Ответить
@gkdresden
@gkdresden - 31.05.2023 11:11

The problem with the readout of open analog pins is that they are sensitive to EM. And a lot of the environmental EM is predictable. Another important point is to use noise source which is evenly distributed. Noise of semiconductor sources is often "colored". So I prefer metal film resistors as noise source in combination with a low noise opamp, whos input referred noise is considerably lower than the noise of the resistive noise source (100 kOhm resistor) in order to do signal conditioning for the analog input by use of amplification and offset.

Ответить
@hgbugalou
@hgbugalou - 05.07.2023 04:37

Reading floating analog pins is a great way to get entropy on micro boards. I'm going to have to keep that in my back pocket.

Ответить
@ezengondolkozom3700
@ezengondolkozom3700 - 22.02.2024 18:29

Great video. An improvement would be to drive a diode or transistor in reverse breakdown mode and amplify the signal to the ADC-s voltage range. That way you get a good entropy signal from thermal noise.

Ответить