Skip to content

Instantly share code, notes, and snippets.

@boxalljohn
Last active December 19, 2015 18:18
Show Gist options
  • Select an option

  • Save boxalljohn/5997501 to your computer and use it in GitHub Desktop.

Select an option

Save boxalljohn/5997501 to your computer and use it in GitHub Desktop.
#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