Random function

The application will allways execute the same way so the random seed is always the same.

An often used initializer for randomSeed is analogRead(A0) with A0 connected to nothing. It is still not really random (it will fail on real random tests) but for many applications it is random enough.

Another option is to use a button and use micros()/4 to initialize the random seed if the key is pressed and/or released.