does anyone have experience working with the DFRobot LCD keypad shield from progressive Automations, do I have to put pinMode as A0 in setup, I am trying to make a dice to play Catan with, here's what I have so far
#include <LiquidCrystal.h>
LiquidCrystal lcd(8, 9, 4, 5, 6, 7);
#include <DFR_LCD_Keypad.h>
DFR_LCD_Keypad keypad(A0, &lcd);
int diceOne;
int diceTwo;
#define btnSELECT 4
void setup() {
lcd.begin(16, 2);
lcd.setCursor(1, 0);
lcd.print("Roll the dice!");
}
void loop() {
while (btnSELECT == LOW); <-- I want to wait till the button is pushed and then roll the dice
if (btnSELECT == HIGH);
diceOne = random(1, 7);
diceTwo = random(1, 7);
if (diceOne + diceTwo == 7) {
lcd.clear();
lcd.setCursor(7, 0);
lcd.print("7");
lcd.setCursor(3, 1);
lcd.print("The pirate");
if (diceOne + diceTwo == 5, 4, 3, 2, 6 ) {
lcd.clear();
lcd.setCursor(7, 0);
lcd.print("5,4,3,2,6");
}
}
}
i cant get dice to roll on button press, it always rolls by itself and
P.S the buttons are assigned to A0
plz help