Cov txheej txheem:

4x4 Matrix Membrane Keypad Siv Arduino Nano: 4 Cov Kauj Ruam
4x4 Matrix Membrane Keypad Siv Arduino Nano: 4 Cov Kauj Ruam

Video: 4x4 Matrix Membrane Keypad Siv Arduino Nano: 4 Cov Kauj Ruam

Video: 4x4 Matrix Membrane Keypad Siv Arduino Nano: 4 Cov Kauj Ruam
Video: 4x4 MATRIX KEYPAD / MEMBRANE KEYBOARD - Arduino tutorial #26 2024, Kaum ib hlis
Anonim
4x4 Matrix Membrane Keypad Siv Arduino Nano
4x4 Matrix Membrane Keypad Siv Arduino Nano

4x4 Matrix Membrane Keypad yog tus lej keypad uas feem ntau siv los ua Arduino cov haujlwm, xws li lub laij lej, tus lej nkag nkag thiab lwm yam.

Nov yog cov yam ntxwv ntawm cov keypad no:

  • Tsim nyias heev
  • yooj yim siv hauv txhua lub microcontroller

Kev Qhia Tshwj Xeeb:

  • Qhov siab tshaj 24VDC, 30mA
  • 8-pin nkag mus rau 4x4 matrix
  • 4x4 qhov tseem ceeb (4 Kab & 4 Kab)
  • Ua haujlwm kub: 0 txog 50 ° C.

Kauj Ruam 1: Cov Cheeb Tsam Xav Tau

Yuav tsum tau Cheebtsam
Yuav tsum tau Cheebtsam
Yuav tsum tau Cheebtsam
Yuav tsum tau Cheebtsam
Yuav tsum tau Cheebtsam
Yuav tsum tau Cheebtsam
Yuav tsum tau Cheebtsam
Yuav tsum tau Cheebtsam

Nov yog cov npe ntawm cov khoom siv xav tau:

  • 4x4 Matrik Membrane Keypad
  • Arduino Nano V3
  • Jumper hlau
  • USBmini

Yuav tsum muaj tsev qiv ntawv:

Adafruit Keypad

Kauj Ruam 2: Txuas Tus Keypad rau Arduino

Txuas tus Keypad rau Arduino
Txuas tus Keypad rau Arduino
Txuas tus Keypad rau Arduino
Txuas tus Keypad rau Arduino

Ua raws cov lus qhia hauv qab no txhawm rau txuas cov keyboard rau Arduino

Keypad rau Arduino

1. Kab 0 ==> D5

2. Kab 1 ==> D4

3. Kab 2 ==> D3

4. Kab 3 ==> D2

5. Col 0 ==> D11

6. Col 1 ==> D10

7. Col 2 ==> D9

8. Col 3 ==> D8

Kauj ruam 3: Programming

Programming
Programming

Nco ntsoov lub tsev qiv ntawv "Adafruit Keypad" tau ntxiv rau hauv Arduino IDE. Yog tias koj tsis paub yuav ntxiv tsev qiv ntawv li cas, saib kab ntawv no "Ntxiv tsev qiv ntawv rau Arduino"

OK, rov qab mus rau lub ncauj lus Txoj hauv kev qhib qhov kos duab zoo li no:

  • Qhib Arduino IDE
  • Nyem Cov Ntaub Ntawv> Piv txwv> Adafruit Keypad> keypad_test
  • Nyem Upload.

Kauj Ruam 4: Qhov tshwm sim

Qhov tshwm sim
Qhov tshwm sim
Qhov tshwm sim
Qhov tshwm sim

Txhawm rau pom cov txiaj ntsig, qhib lub ntsuas saib.

Qhov tshwm sim yuav zoo li no:

Piv txwv li, lub pob '1' ntawm tus lej xov tooj raug nias, tus saib xyuas lub xov tooj yuav tso tawm "1 nias". Tom qab ntawd thaum lub '1' khawm ntawm cov keyboard tau tso tawm, lub tshuab saib xyuas yuav tso saib "1 tso tawm".

Ua tsaug rau koj nyeem kab lus no, pom koj hauv kab lus tom ntej. yog tias muaj lus nug, tsuas yog sau hauv kab lus

Pom zoo: