---
# System prepended metadata

title: SOME

---

# some-01
``` C =
#include <Keypad.h>; //引用LCD_I2C.h 函式庫
#include<LiquidCrystal_I2C.h>
LiquidCrystal_I2C mylcd(0x27,16,2);


const byte ROWS = 4 ;
const byte COLS = 4 ;
char keys [ROWS][COLS] = {     // 設定按鍵的「行、列」代表值
    {'1','2','3','A'}, 
    {'4','5','6','B'}, 
    {'7','8','9','C'},
    {'*','0','#','D'}
};
byte rowPins[ROWS] = {9,8,7,6};
byte colPins[COLS] = {5,4,3,2};

Keypad keypad = Keypad(makeKeymap(keys),rowPins,colPins,ROWS,COLS);
void setup()
{
    Serial.begin(9600); // 設定序列埠通訊頻率
    mylcd.init();
    mylcd.backlight();
}   
void loop()
{
   char key = keypad.getKey();
   if(key != NO_KEY){
    Serial.println(key);
    mylcd.print(key);
   }
}

```