#include <Keypad.h>
#include <Arduino.h>
#include "getKey.h"
#include "lcdOutput.h"
#include <LiquidCrystal_I2C.h>
//#include <Cpp_Standard_Library.h>
#include <Vector.h>
LiquidCrystal_I2C lcd(0x27, 16, 2);
void setup() {
// put your setup code here, to run once:
lcd.backlight();
lcd.begin(16,2);
//lcd.setCursor();
lcd.print("Basic Calculator");
delay(600);
lcd.clear();
lcd.backlight();
//Serial.begin(9600);
for(int rows=0; rows < numRows; rows++ ){
pinMode(rowPins[rows], INPUT);
digitalWrite(rowPins[rows], HIGH);
}
for(int cols = 0; cols < numCol; cols++){
pinMode(colPins[cols], OUTPUT);
digitalWrite(colPins[cols], HIGH);
}
}
void loop() {
// put your main code here, to run repeatedly:
lcd.backlight();
char key = getKey();
if(key != '#'){
char output = lcdOutput(key);
//Serial.print(key);
lcd.print(output);
}else{
lcd.print("Cancel");
}
}