#include <LiquidCrystal.h>
LiquidCrystal lcd(12,11,10,9,8,7);
// void setup() {
// // put your setup code here, to run once:
// lcd.begin(16,2);
// lcd.print("Hello person!");
// }
// void loop() {
// // put your main code here, to run repeatedly:
// lcd.setCursor(0,1);
// lcd.print("Lets Learn Iot");
// }
int randomnumber;
void setup(){
lcd.begin(16,2);
randomSeed(7);
pinMode(8, INPUT);
}
void loop()
{
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);
}