#include<LiquidCrystal.h>
LiquidCrystal lcd(12,11,10,9,8,7);
int randomnumber;
void setup() {
// put your setup code here, to run once:
lcd.begin(16,2);
randomSeed(7);
pinMode(4, INPUT);
}
void loop() {
// put your main code here, to run repeatedly:
lcd.setCursor(2,0);
lcd.print("Dice value is:");
int DICEROLL=digitalRead(8);
if(DICEROLL==1)
randomnumber=random(1,7);
lcd.setCursor(6,1);
lcd.print(randomnumber);
}