I have a problem in how the author of the programming code with LCD I have a problem in how the author of the programming code with LCD I put in the programming book plate numbers 4 * 3 keys shown on the LCD
This code shows how to measure the Abe with BMI units?
#include <Keypad.h>
#include <LiquidCrystal.h>
+
// initialize the library with the numbers of the interface pins
LiquidCrystal lcd(6, 5, 4, 3, 2, 1);
const byte ROWS = 4; //four rows
const byte COLS = 3; //three columns
char keys[ROWS][COLS] = {
{'#','0','*'},
{'9','8','7'},
{'6','5','4'},
{'3','2','1'}
};
byte rowPins[ROWS] = {10, 9, 8, 7}; //connect to the row pinouts of the keypad
byte colPins[COLS] = {13, 12, 11}; //connect to the column pinouts of the keypad
Keypad keypad = Keypad( makeKeymap(keys), rowPins, colPins, ROWS, COLS );
void setup() {
// set up the LCD's number of columns and rows:
lcd.begin(16, 2);
// Print a message to the LCD.
lcd.print("kg!");
}
void loop() {
char key = keypad.getKey();
if (key){
lcd.setCursor(0, 1);
lcd.print(key);
}
}