long random(long howbig) long random(long howsmall, long howbig)
random() generates a pseudo-random number between either 0 or howsmall, and howbig inclusive. The seed for the random number may be set using randomSeed().
A random number.
random() conforms to the Arduino 1.6.x API.
A random number between 0 and 10:
int rnum = random(10);
A random number between -20 and +20:
int rnum = random(-20, 20);