Комментарии:
Another excellent video!
ОтветитьWell made as always!
Ответить🤎💙💚💜❤️
Ответитьawesomesauce!
Ответить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 💡.
Ответить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.
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)
Ответить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.
Ответить"Anyone who considers arithmetic methods of generating random digits is, of course, in a state of sin"
John Von Neumann
"Why else would we create coins?" No reason, other than to flip them. Coins aren't used for anything else.
ОтветитьThe way GPU shaders generate "random" numbers is also very interesting.
ОтветитьStumbled across this video, never heard of CLG bevore but it probably solved a >5 years old problem of mine. big THANKS!
Ответить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 :)
Ответить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.
Ответить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.
Ответить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.
Ответить