Cov txheej txheem:
- Kauj Ruam 1: Yam Koj Yuav Tsum Tau:-
- Kauj Ruam 2: Nkag Siab Cov Keypad:-
- Kauj Ruam 3: Kev Sib Txuas:-
- Kauj ruam 4: Keypad Code:-
- Kauj Ruam 5: Arduino Calculator Code:-
Video: Yuav Siv Keypad & LCD Nrog Arduino Ua Li Cas Arduino Calculator.: 5 Kauj Ruam
2024 Tus sau: John Day | [email protected]. Kawg hloov kho: 2024-01-30 09:27
Hauv qhov kev qhia no kuv yuav qhia koj yuav siv 4x4 matrix keypad thiab 16x2 LCD nrog Arduino li cas thiab siv nws los ua Arduino Calculator yooj yim.
Yog li cia pib …
Kauj Ruam 1: Yam Koj Yuav Tsum Tau:-
Yuav Tsum Tau Kho Vajtse:-
- Arduino UAS.
- 4 x 4x keypad. (Koj tuaj yeem siv 4x3 cov keyboard).
- 16x2 LCD Zaub
- Cov qhob cij.
- 10 k potentiometer.
- qee cov xov hlau los txuas rau lub keyboard.
Yuav tsum tau Software:-
Arduino IDE Cov
Qhov ntawd yog txhua yam koj yuav xav tau rau txoj haujlwm no.
Kauj Ruam 2: Nkag Siab Cov Keypad:-
Yog li txhawm rau siv cov keypads ua ntej koj yuav tsum nkag siab tias cov keyboard ua haujlwm li cas.
Keypad tsis muaj dab tsi tab sis khawm khawm nrog nxn tus lej ntawm kab thiab kab. Cov kab yog kab rov tav thiab Kab yog ntsug.
Hauv 4x4 matrix muaj 4 Kab thiab 4 kab thiab hauv 4x3 muaj 4 Kab thiab 3 Kab.
Txhua khawm hauv kab tau txuas nrog txhua lwm cov nyees khawm hauv tib kab. Tib yam nrog kab.
Nias lub pob kaw qhov kev hloov pauv ntawm ib kab thiab kab kab, tso cai rau tam sim no ntws los ntawm Kab Tus Kab thiab Kab Tus Kab. Nov yog li cas arduino pom lub pob twg raug nias.
Kuv tsis xav dhia dej tob rau hauv nws thiab ua rau cov lus qhia tho txawv yog li yog tias koj xav kawm paub ua haujlwm ntawm cov keyboard hauv qhov tob koj tuaj yeem tshawb xyuas cov ntawv no.
Cia peb txav mus rau qib tom ntej …
Kauj Ruam 3: Kev Sib Txuas:-
1. Siv cov xov hlau txuas rau ntawm tus xovtooj. Solder header pins rau lwm qhov kawg.
2. Xa mus rau daim duab rau thiab ua kev sib txuas raws li hauv qab no:-
- R1 = D2
- R2 = D3
- R3 = D4
- R4 = D5
- C1 = D6
- C2 = D7
- C3 = D8
- C4 = D9
3. Kev sib txuas hauv LCD yog yooj yim ib yam nkaus.
- Ua ntej txuas LCD ntawm lub khob cij.
- Tam sim no txuas tus pin RW, LED cathode thiab Vss lossis GND mus rau GND txoj kev tsheb nqaj hlau.
- Txuas Vcc mus rau +ve txoj kev tsheb nqaj hlau. Kuj txuas tus pin LED anode (Txoj cai ib sab ntawm cathode) rau +ve tsheb nqaj hlau los ntawm 220 ohm resistor.
- Txuas qhov sib txawv tus pin sau ua V0 rau nruab nrab lub davhlau ya nyob twg ntawm lub hwj chim. Txuas lwm ob lub dav hlau ntawm lub lauj kaub rau +ve thiab GND.
- Tam sim no txuas tus pin hauv qab no kom:
- D4 = D13
- D5 = D12
- D6 = D11
- D7 = D10
qhov twg, D2, D3,….., D13 yog Digital i/o pins ntawm arduino.
Thaum cov kev sib txuas tau ua tiav. Peb tuaj yeem txav mus rau theem coding …
Kauj ruam 4: Keypad Code:-
Ua ntej koj tuaj yeem pib coding koj yuav tsum teeb tsa lub tsev qiv ntawv rau peb cov keyboard thiab LCD. Txhawm rau rub lub tsev qiv ntawv, qhib IDE thiab nkag mus:-
- Kev kos duab >> suav nrog lub tsev qiv ntawv >> Tswj lub tsev qiv ntawv.
- Hauv qhov tshawb nrhiav hom "Keypad.h" thiab nqes mus nrhiav "Keypad library by Mark Stanley version 3.1.1"
- Kuj xyuas yog tias lub tsev qiv ntawv LiquidCrystal tau teeb tsa. Yog tsis yog, koj tuaj yeem pom nws siv tib txoj kev.
- Nruab cov tsev qiv ntawv thiab rov pib dua IDE.
Tam sim no theej cov cai hauv qab no thiab muab nws tso rau hauv IDE. Upload nws mus rau arduino. (Code rau 4x3 tuaj yeem rub tawm los ntawm hauv qab no):-
Txoj cai no yuav pab koj txheeb xyuas qhov ua haujlwm ntawm Keypad, Nws qhia lub pob nyem ntawm Serial monitor.
/*Code rau 4x4 keypad*/
#include 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] = {5, 4, 3, 2}; byte colPins [COLS] = {9, 8, 7, 6}; Keypad keypad = Keypad (uaKeymap (tuav), rowPins, colPins, ROWS, COLS); teeb tsa tsis muaj dab tsi () {Serial.begin (9600); } void loop () {char key = keypad.getKey (); yog (qhov tseem ceeb) {Serial.println (qhov tseem ceeb); }}
Nrog rau qhov no koj tuaj yeem pib nrog cov keyboard nrog arduino, Tus lej rau lub laij lej yog nyob rau theem tom ntej..
Kauj Ruam 5: Arduino Calculator Code:-
Thaum koj tau sim cov keyboard, thiab nws ua haujlwm tau zoo. koj tuaj yeem txav mus los ua lub laij lej yooj yim.
Koj tuaj yeem rub tawm cov cai los ntawm cov ntawv hauv qab no.
Txhawm rau siv lub laij lej yooj yim upload cov cai, Cov tsiaj ntawv tau siv raws li hauv qab no:-
A = + (Ntxiv)
B = - (Rho tawm)
C = * (Sib npaug)
D = / (faib)
Cov cim * thiab # tau siv ua 'Ncua tseg' thiab 'Sib npaug rau' Raws li
Nov yog txhua yam rau qhov kev qhia no. Vam tias koj nyiam.
Ua tsaug.
Pom zoo:
YUAV UA LI CAS YUAV UA LI CAS YUAV TSUM MUAJ KEV LAG LUAM CIRCUIT Siv D882 Tus Neeg Soj Ntsuam: 3 Kauj Ruam
YUAV UA LI CAS YUAV UA LI CAS YUAV TSUM TAU LWM YAM CIRCUIT Siv D882 Tus Kws Tshaj Lij: HELLO phooj ywg, Zoo siab txais tos rau kuv CHANNEL, Hnub no kuv yuav qhia koj li cas kom ua tau CIRCUIT ntawm kev siv hluav taws xob tsis siv neeg lub teeb pom kev siv D882
YUAV UA LI CAS YUAV UA LI CAS YUAV TSUM ROBOT COOB SCARECROW: 16 Cov Kauj Ruam (nrog Duab)
YUAV UA LI CAS YUAV TSUM NYOB ROBOT COW SCARECROW: Kuv nyuam qhuav tsim Moo-Bot, tus neeg hlau nyuj scarecrow dhia hla lub hli, rau kev sib tw hauv zej zog scarecrow.Kuv kev tshoov siab yog los ntawm kuv tus tub hu nkauj "hey diddle diddle, miv thiab fiddle. .. " Txoj haujlwm zoo heev los ua haujlwm nrog kuv
Yuav Siv Mac Terminal Li Cas, thiab Yuav Siv Li Cas Tseem Ceeb: 4 Kauj Ruam
Yuav Siv Mac Terminal Li Cas, thiab Yuav Siv Li Cas Cov Haujlwm Tseem Ceeb: Peb yuav qhia koj li cas qhib MAC Terminal. Peb kuj tseem yuav qhia koj ob peb yam hauv Terminal, xws li ifconfig, hloov cov npe, nkag mus rau cov ntaub ntawv, thiab arp. Ifconfig yuav tso cai rau koj los tshuaj xyuas koj tus IP chaw nyob, thiab koj li MAC ad
YUAV UA LI CAS YUAV UA LI CAS NYOB ZOO TSHAJ PLAWS NROG IR IR LIGHT: 5 Kauj Ruam (nrog Duab)
YUAV UA LI CAS Ua Ib Lub Koob Yees Duab Tsis Muaj IR IR LIGHT: Kuv tau pom lub koob yees duab Infrared thiaj li siv nws hauv lub kaw lus kaw suab. Nrog nws koj tseem tuaj yeem tau txais cov duab txias no: cov khoom ci hauv lub zeem muag lub koob yees duab uas ib txwm muaj nyob hauv qhov tseeb. Koj tuaj yeem tau txais cov txiaj ntsig zoo nkauj rau tus nqi pheej yig Nws
Yuav Ua Li Cas Thiaj Li Yooj Yim Yooj Yim 'Calendar & Scrapbook (txawm hais tias Koj Tsis Paub Yuav Ua Li Cas Scrapbook): 8 Kauj Ruam (nrog Duab)
Yuav Ua Li Cas Thiaj Li Yooj Yim Yooj Yim 'Calendar & Scrapbook (txawm hais tias Koj Tsis Paub Yuav Ua Li Cas Scrapbook): Nov yog qhov kev lag luam pheej yig (thiab muaj txiaj ntsig ntau!) Hnub so khoom plig rau niam tais yawm txiv. Kuv tau ua 5 daim qhia hnub hli xyoo no rau tsawg dua $ 7 txhua qhov khoom siv: 12 daim duab zoo ntawm koj tus menyuam, menyuam yaus, ntxhais xeeb ntxwv, tub xeeb ntxwv, dev, miv, lossis lwm tus txheeb ze 12 daim sib txawv