Last active
December 19, 2015 18:18
-
-
Save boxalljohn/5997501 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #include <LiquidCrystal.h> // we need this library for the LCD commands | |
| LiquidCrystal lcd(10,11,12,13,14,15,16); | |
| float noisy = 0; | |
| void setup() | |
| { | |
| lcd.begin(16, 2); // need to specify how many columns and rows are in the LCD unit | |
| lcd.println("tronixstuff! "); | |
| lcd.setCursor(0,1); | |
| delay(2000); | |
| lcd.clear(); | |
| randomSeed(analogRead(0)); // reseed the random number generator with some noise | |
| } | |
| void loop() | |
| { | |
| noisy=random(1000); | |
| lcd.setCursor(0,0); | |
| lcd.print("Random Numbers!"); | |
| lcd.setCursor(0,1); | |
| lcd.print("Number: "); | |
| lcd.print(noisy,0); | |
| delay(1000); | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment