SHARE
TWEET

Arduino Random Number Generator

KeeganT Dec 17th, 2018 76 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. void setup()
  2. {
  3.     Serial.begin(9600);
  4.     randomSeed(analogRead(A0));
  5. }
  6.  
  7. void loop()
  8. {
  9.     randomNumber=random(1,10);
  10.     Serial.print(randomNumber);
  11.     delay(1000);
  12. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Not a member of Pastebin yet?
Sign Up, it unlocks many cool features!
 
Top