Reseed / True random on Arduino Nano every

I saw this post, how do I add it to my script ?
tried copy/paste

got this -
exit status 1
#include expects “FILENAME” or

removed the #include
afe_Last_Version1:420:6: error: redefinition of ‘void setup()’
void setup()
^~~~~
C:\Users\User\Documents\Arduino\Safe_Last_Version1.ino:65:6: note: ‘void setup()’ previously defined here
void setup( void )
^~~~~
exit status 1
variable or field ‘reseedRandom’ declared void

how do I add it ?
just trying to replace -
randomSeed(analogRead(1));

with more random option since I’m getting 90% of the time the same numbers on random and anaglogread is not connteced
removed setup getting
‘eeprom_read_dword’ was not declared in this scope

what am I missing ?

did some digging, and its something with my board

How can I use this script or any other true random on nano every ? ( cant really replace the board)

tried also -

looks like same issue

Hello @avielj. The forum very recently went through an upgrade. There has been some trouble. That post is a good example.

I updated that post so the code should now be correct. Use the copy button in the upper-right corner to capture the source code.

image

You will have to merge that code with yours.

CB - are you sure that you put the code in a code block ?
There is no select button showing here

That’s especially weird. It was already in a code block. I added the language (cpp) then saved. That seemed to correct the mistakes.

Even now it appears correct to me and has the select button. And the select button is working.

Here is how it appears to me

It looks OK in your original topic

Great it did compile,
I added everything,
now I just need to
comment -
randomSeed(analogRead(0));
thats it ?
or should I add / change something else ?

Correct. Remove the randomSeed(analogRead(0));

The reseedRandom(&reseedRandomSeed); call in setup will seed the random number generator when your program starts.

great its working, thank you very much :slight_smile:

1 Like

This topic was automatically closed 120 days after the last reply. New replies are no longer allowed.