Keypad 3x4

Key Button Membrane Switch 3x4 Keys Matrix Array Keyboard Keypad Control Panel DIY Kit For Arduino


14 ₪

الناشر: ⚡ Electronic Store ⚡

القسم: Button - switch

تاريخ النشر: 2025-12-29




keypad 3x4 to arduino

محتويات

- code




code

code
نسخ
اقتباس
عرض
تنزيل
	
								
#include <Keypad.h> const int ROW_NUM = 4; //four rows const int COLUMN_NUM = 4; //four columns char keys[ROW_NUM][COLUMN_NUM] = { {'1','2','3'}, {'4','5','6'}, {'7','8','9'}, {'*','0','#'} }; byte pin_rows[ROW_NUM] = {9, 8, 7, 6}; //connect to the row pinouts of the keypad byte pin_column[COLUMN_NUM] = {5, 4, 3}; //connect to the column pinouts of the keypad Keypad keypad = Keypad( makeKeymap(keys), pin_rows, pin_column, ROW_NUM, COLUMN_NUM ); void setup(){ Serial.begin(9600); } void loop(){ char key = keypad.getKey(); if (key){ Serial.println(key); } }


عرض السلة (تأكيد الشراء) افراغ السلة
اتمام الشراء