Cov txheej txheem:

KEYPAD: 8 Kauj ruam
KEYPAD: 8 Kauj ruam

Video: KEYPAD: 8 Kauj ruam

Video: KEYPAD: 8 Kauj ruam
Video: Tus Neeg Ruam - R-Lin Thoj | New Song [ Official MV ] Nkauj Tawm Tshiab 2023 Hmong Song 2023 2024, Kaum ib hlis
Anonim
KEYPAD
KEYPAD

Niaj hnub no qhov kuv tab tom tham txog tsis yog lub cim nws yog ib qho uas koj txhua tus paub nrog yog ib lub keyboard tsis yog ib qho zoo li lub xov tooj qub shave nws yog ib qho uas siv nrog microcontroller sib txawv kom tau txais cov txiaj ntsig xav tau

Feem ntau cov cuab yeej muaj xws li kov cov keypads lossis lub cev rau nkag mus rau cov ntaub ntawv nkag mus thiaj li siv qhov no rau hauv peb tes num kuv tau txiav txim siab los ua kab lus ntawm nws.

Kauj ruam 1: KEYPAD yog dab tsi

Nws yog 4x4 Matrix hom qauv lossis Circuit uas raws li tus lej ntawm kab thiab kab ntawv txiav txim siab qhov tsim tawm ntawm tus yuam sij. Tsis muaj kab thiab kab nrog rau cov ntsiab lus muaj nyob hauv txhua tsab ntawv tau muab tso rau hauv lub microcontroller thiab tom qab ntawd cov txiaj ntsig tau txiav txim siab los ntawm microcontroller raws li cov lej

Kauj ruam 2: SIV

  • Yooj yim rau siv
  • Tus nqi qis
  • Yuav tuaj yeem txuas rau txhua tus tswj hwm micro

Kauj ruam 3: PINOUT

PINOUT
PINOUT

Kauj Ruam 4: YUAV TSUM MUAJ NTAUB NTAWV

  • Ib qho microcontroller nyiam Arduino Uno rau cov pib tshiab.
  • Ib daim ntawv qhia zaub mov
  • Jumper xov hlau
  • Keypad

Kauj ruam 5: Kev sib txuas

KEV SIV
KEV SIV

Txuas tus pin uas yog kab thiab kab ntawm cov keypad raws li daim duab saum toj no thiab hauv qab cov cai thiab siv lub ntsuas saib kom pom qhov tso tawm.

Kauj Ruam 6: CODE

#suav nrog

const byte ROWS = 4; // plaub kab

const byte COLS = 4; // plaub kab

// txhais cov cymbols ntawm cov nyees khawm ntawm cov keypads

char hexaKeys [ROWS] [COLS] = {

{'1', '2', '3', 'A'}, {'4', '5', '6', 'B'}, {'7', '8', '9', 'C'}, {'*', '0', '#', 'D'}

};

byte rowPins [ROWS] = {9, 8, 7, 6}; // txuas rau kab pinouts ntawm cov keyboard

byte colPins [COLS] = {5, 4, 3, 2}; // txuas mus rau kab ntawv pinouts ntawm cov keyboard

// pib qhov piv txwv ntawm chav kawm NewKeypad

Keypad customKeypad = Keypad (uaKeymap (hexaKeys), rowPins, colPins, ROWS, COLS);

void teeb tsa () {

Serial.begin (9600);

}

void voj () {

char customKey = customKeypad.getKey ();

yog (customKey) {

Serial.println (customKey);

}

}

NCO TSEG:- Kuv tau siv KEYPAD LIBRARY uas tuaj yeem teeb tsa siv Arduino tus thawj tswj tsev qiv ntawv

Kauj Ruam 7: Ua haujlwm

Raws li txoj cai pib nws pib cov pins uas yog kab thiab kab pins uas cov keyboard tau txuas nrog thiab tom qab ntawd khaws nws cov nqi hauv cov lej. Tom qab ntawd lub micro-maub los tos rau qhov tso tawm los ntawm cov keyboard matrix. Tom qab tau txais qhov tso tawm micro-maub los txiav txim siab cov zis ntawm cov keyboard raws li cov lej nkag rau hauv nws thaum pib.

Tom qab ntawd cov txiaj ntsig sib xws rau lub zeem muag tau tshwm rau ntawm lub ntsuas saib (Ctrl+Ua haujlwm+M).

Kauj Ruam 8: PCB Tsim

PCB tsim
PCB tsim
PCB tsim
PCB tsim
PCB tsim
PCB tsim

Tam sim no peb tau txais PCB tsim thiab nws yog lub sijhawm los xaj cov PCB.

Txog qhov ntawd, koj tsuas yog yuav tsum mus rau JLCPCB.com, thiab nyem rau ntawm "QUOTE NOW" khawm.

JLCPCB kuj yog tus txhawb nqa txoj haujlwm no. JLCPCB (ShenzhenJLC Electronics Co., Ltd.), yog lub tuam txhab PCB loj tshaj plaws hauv Suav teb thiab cov tuam txhab tsim khoom lag luam tshwj xeeb tshwj xeeb hauv PCB sai sai thiab tsim cov PCB me me. Koj tuaj yeem xaj yam tsawg kawg ntawm 5 PCBs rau tsuas yog $ 2.

Txhawm rau kom tau txais PCB tsim, xa cov ntaub ntawv gerber koj rub tawm hauv cov kauj ruam kawg. Rub cov ntaub ntawv.zip lossis koj tseem tuaj yeem rub thiab poob cov ntaub ntawv gerber.

Tom qab xa cov ntaub ntawv zauv teb, koj yuav pom cov lus ua tiav hauv qab yog tias cov ntawv tau ua tiav tiav. Koj tuaj yeem tshuaj xyuas PCB hauv Gerber tus saib kom paub tseeb tias txhua yam zoo. Koj tuaj yeem saib ob sab saum toj thiab hauv qab ntawm PCB.

Tom qab ua kom ntseeg tau tias peb cov PCB zoo, tam sim no peb tuaj yeem tso qhov kev txiav txim ntawm tus nqi tsim nyog. Koj tuaj yeem xaj 5 PCBs rau tsuas yog $ 2 tab sis yog tias nws yog koj thawj xaj ces koj tuaj yeem tau txais 10 PCBs rau $ 2.

Txhawm rau txiav txim, nyem rau ntawm "SAVE TO CART" khawm.

Kuv cov PCBs tau siv 2 hnub los tsim khoom thiab tuaj txog hauv ib lub lis piam siv DHL qhov kev xaiv xa khoom. PCBs tau ntim tau zoo thiab qhov ua tau zoo tiag tiag.

Pom zoo: