#include <LiquidCrystal_I2C.h>
LiquidCrystal_I2C lcd(0x27, 16, 2);
#include <Keypad.h>
const byte ROWS = 4;
const byte COLS = 4;
char hexaKeys[ROWS][COLS] = {
{'1', '2', '3', 'A'},
{'4', '5', '6', 'B'},
{'7', '8', '9', 'C'},
{'*', '0', '#', 'D'}
};
byte rowPins[ROWS] = {A15, A14, A13, A12};
byte colPins[COLS] = {A11, A10, A9, A8};
Keypad customKeypad = Keypad(makeKeymap(hexaKeys), rowPins, colPins, ROWS, COLS);
#include <TM1637Display.h>
#define CLK 3
#define DIO 2
TM1637Display display = TM1637Display (CLK, DIO);
int count;
void setup(){
lcd.init();
lcd.backlight();
display.setBrightness(4); // activate display
Serial.begin(9600);
}
void loop(){
char customKey = customKeypad.getKey();
if (customKey){
Serial.println(customKey);
lcd.setCursor(1, 1);
lcd.print(customKey);
count = atoi(customKey);
display.showNumberDec(count);
}
}
Unable to write on TM1637 display
Its showing a ZER0 all the time with any key pressed