Cov txheej txheem:

Teeb DS1302 RTC Module Nrog Keypad + Arduino + LCD: 3 Kauj Ruam
Teeb DS1302 RTC Module Nrog Keypad + Arduino + LCD: 3 Kauj Ruam

Video: Teeb DS1302 RTC Module Nrog Keypad + Arduino + LCD: 3 Kauj Ruam

Video: Teeb DS1302 RTC Module Nrog Keypad + Arduino + LCD: 3 Kauj Ruam
Video: How to setup RTC DS1302 with Keypad + LCD + Arduino 2024, Kaum ib hlis
Anonim
Image
Image

Nyob zoo, Kuv tsuas yog ua qhov haujlwm me me no, Kuv vam tias koj nyiam nws, raws li lub npe hais tias nws yog hais txog kev siv tus lej xov tooj los teeb tsa DS1302, nws yog ib qho ntawm cov phiaj xwm yooj yim koj tuaj yeem ntxiv nws rau koj tus kheej txoj haujlwm yog tias koj xav ntxiv lwm cov qauv lossis cov haujlwm … Nws yooj yim heev rau nkag siab thiab hloov pauv tau, Kuv vam tias koj nyiam nws thiab pom nws muaj txiaj ntsig.

Saib cov vis dis aus saum toj no yog tias koj xav tau kev pab ntxiv, lossis nug hauv nqe lus nws yog qhov txaus siab.

Kauj Ruam 1: Cov Qauv thiab Cov Khoom Xav Tau

Cov Qauv thiab Cov Khoom Xav Tau
Cov Qauv thiab Cov Khoom Xav Tau
Cov Qauv thiab Cov Khoom Xav Tau
Cov Qauv thiab Cov Khoom Xav Tau
Cov Qauv thiab Cov Khoom Xav Tau
Cov Qauv thiab Cov Khoom Xav Tau

Rau qhov no, peb yuav xav tau:

-Arduino board ntawm no kuv siv Arduino UNO

-DS1302 RTC module

-4*4 lossis 4*3 Matrix Keypad ntawm no kuv siv 4*4

-LCD i2c npo

Qee qhov dhia xov hlau thiab 1k resistor (Tsuas yog koj muaj teeb meem RTC)

Kauj ruam 2: Kev thaiv kab

Thaiv
Thaiv

Kev thaiv raws li cov qauv qhia nws:

-Keypad pins: 1-8 nrog D5-D12

-RTC DS1302: - Vcc - 5v

- GND - NCO

- CLK - D2

- DAT- (1k resistor optionnal, yog tias tsuas yog koj tau txais qhov teeb meem priting) - D3

RST - D4

-LCD i2c: - Vcc - 5v

- GND - NCO

SDA - A4

TSO - A5

Kauj Ruam 3: Cov tsev qiv ntawv, Cov Cai thiab Kev Ua Haujlwm

Ntawm no koj tuaj yeem rub tawm txhua lub tsev qiv ntawv kuv tau siv (.zip) npaj rau nruab thiab code hauv ".ino" hom ntawv:

- RTC cov tsev qiv ntawv muaj txiaj ntsig zoo

- LCD i2c NewLiquidCrystal tsev qiv ntawv

- Keypad Library

Thiab ntawm no yog txoj cai: Rub tawm Code

Kev Ua Haujlwm: Tom qab thaiv, xa cov cai, tso cai rau koj lub rooj tsav xwm Arduino, feem ntau yog lub sijhawm pib lossis teeb tsa ua ntej hnub thiab sijhawm yuav tsum tshwm ntawm LCD, koj nias "*" txhawm rau pib teeb tsa siv lub keyboard, nws yuav nug koj kom teeb tsa xyoo, hli… Thaum koj nias lub pob qhov program cia li khaws qhov tseem ceeb, piv txwv li: thaum nws yuav nug koj kom teeb lub xyoo koj nias (2-0-1-8) nws yuav cia li khaws cia tom qab ntawd nws yuav nug koj kom nkag mus hli … rau hli, teev … koj yuav tsum sau ob tus lej zoo li lub Plaub Hlis (0-4) …

Kuv tsis ntxiv vib nas this ib hnub ntawm lub lim tiam, "Laziness: D: D" ntxiv lawv yog tias koj xav tau.

Xav tias dawb tawm lus, tawm tswv yim lossis lus nug yog tias koj muaj teeb meem.

Pom zoo: