mirror of
https://github.com/taigrr/arduinolibs
synced 2025-01-18 04:33:12 -08:00
Remove EEPROM address argument from RNG.begin()
Always store the seed at the very end of EEPROM memory.
This commit is contained in:
@@ -11,9 +11,6 @@
|
||||
// even if the input noise or seed data is otherwise identical.
|
||||
#define RNG_APP_TAG "MyApp 1.0"
|
||||
|
||||
// EEPROM address to save the random number seed at.
|
||||
#define RNG_EEPROM_ADDRESS 950
|
||||
|
||||
// Noise source to seed the random number generator.
|
||||
TransistorNoiseSource noise(A1);
|
||||
//RingOscillatorNoiseSource noise;
|
||||
@@ -28,7 +25,7 @@ void setup() {
|
||||
Serial.println("start");
|
||||
|
||||
// Initialize the random number generator.
|
||||
RNG.begin(RNG_APP_TAG, RNG_EEPROM_ADDRESS);
|
||||
RNG.begin(RNG_APP_TAG);
|
||||
|
||||
// Add the noise source to the list of sources known to RNG.
|
||||
RNG.addNoiseSource(noise);
|
||||
|
||||
Reference in New Issue
Block a user