from machine import Pin,SoftI2C,PWM
from i2c_lcd import I2cLcd
from time import sleep
AddressOfLcd = 0x27
i2c = SoftI2C(scl=Pin(33), sda=Pin(32), freq=400000)
lcd = I2cLcd(i2c, AddressOfLcd, 2, 16)
servo = PWM(Pin(27), freq=50)
# CONSTANTS
KEY_UP = const(0)
KEY_DOWN = const(1)
keys = [['1', '2', '3', 'A'], ['4', '5', '6', 'B'], ['7', '8', '9', 'C'], ['*', '0', '#', 'D']]
# Pin names for ESP32
rows = [12,13,14,15]
cols = [21,22,23,34]