Cov txheej txheem:

KS-Cat-Feed-Counter: 7 Kauj Ruam
KS-Cat-Feed-Counter: 7 Kauj Ruam

Video: KS-Cat-Feed-Counter: 7 Kauj Ruam

Video: KS-Cat-Feed-Counter: 7 Kauj Ruam
Video: 20 MOMENTS YOU WOULDN'T BELIEVE IF NOT FILMED 2024, Hlis ntuj nqeg
Anonim
KS-Cat-Feed-Counter
KS-Cat-Feed-Counter
KS-Cat-Feed-Counter
KS-Cat-Feed-Counter
KS-Cat-Feed-Counter
KS-Cat-Feed-Counter

Qhov xwm txheej

Thaum koj nyob hauv tsev neeg tsis khoom, feem ntau koj tsis paub pes tsawg zaus koj tus tsiaj tau pub. Tej zaum koj tuaj txog tom tsev thiab koj tus tsiaj thov zaub mov txawm tias nws tsuas yog pub los ntawm lwm tus neeg uas tsis nyob hauv tsev tam sim no.

Txawm li cas los xij, koj cov tsiaj tau fatter thiab fatter. Koj tsis xav yuav lub tshuab pub tsiaj tsis siv neeg vim tias koj muaj kev sib txuas zoo dua rau koj tus tsiaj thaum nws yuav tsum tuaj rau koj kom thov zaub mov. Txawm li cas los xij, koj tsis xav kom nws rog thiab tsis zoo.

Kauj ruam 1: Kev daws teeb meem

Tshuaj
Tshuaj

KS-Cat-Feed-Counter yog txhais los qhia rau koj paub tias pes tsawg zaus koj cov tsiaj tau noj lawm yog li koj nyob hauv kev tswj koj tus tsiaj cov zaub mov.

Nws tau tsim los qhia koj txog plaub zaug noj ib hnub. Koj tuaj yeem hloov pauv qhov muag- thiab kho vajtse kom nce lub txee rau tsib lossis ntau lub sijhawm pub mis.

Kauj ruam 2: Kho vajtse

Kho vajtse
Kho vajtse
Kho vajtse
Kho vajtse
Kho vajtse
Kho vajtse

Arduino Pro Mini (rau kev siv hluav taws xob tsawg)

Upload Module rau Arduino Pro Mini (Cov qauv no los ntawm Aliexpress tsuas yog ua haujlwm ntawm Linux -> Saib cov lus qhia rub tawm hauv cov cai)

4 LED teeb

4 Resistors 10kOhms

Vaj tse rau hluav taws xob thiab roj teeb

Sib nqus hloov

9V thaiv roj teeb nrog txuas

Cov khoom me me zoo li lub rooj tsav xwm hluav taws xob thiab cov xov hlau

(Txhua tus nqi kwv yees li 15 USD hauv Aliexpress.com)

Kauj ruam 3: Qhib thiab kos duab

Library thiab Sketch
Library thiab Sketch
Library thiab Sketch
Library thiab Sketch

LIBRARY: LowPowerLibrary (https://github.com/rocketscream/Low-Power)

Kos duab:

Lub sijhawm kawg tau pom nrog Sketch "2018-08-KS-Cat-Feed-Counter.ino" koj yuav tsum hloov 9V-Block-Battery txhua 6 lub hlis. Yog li kuv txuas Lub Tuam Txhab mus rau lub zog sab nraud (tsis xav tau txuag hluav taws xob ntxiv lawm). Yog tias koj ua qhov no koj tuaj yeem siv daim duab kos "2019-10-KS-Cat-Feed-Counter-NoLowPower.ino".

Kauj ruam 4: Nta

Nta
Nta

Cov cuab yeej no suav txog 4 zaug pub mis. Nws muaj 4 LED's thiab txhua qhov LED ua haujlwm sawv cev rau lub sijhawm pub mis. Tom qab 4 lub sijhawm pub mis, nws rov pib dua ntawm 1. Txij li nws ua haujlwm ntawm roj teeb, nws tau npaj rau kev siv hluav taws xob tsawg. (tsis muaj timers)

Koj muaj ib lub pob los tshuaj xyuas seb pes tsawg zaus koj tus tsiaj tau pub. LED lub teeb ci raws li lub sijhawm pub mis. Ib qho ntxiv, koj muaj ib lub pob kom txo tus nqi noj txhua lub sijhawm koj nias nws. (Rau kev kho piv txwv li koj qhib lub hau tab sis tsis pub tsiaj rau - ua zaub mov ntxiv)

Nws muaj ib qho kev hloov pauv sib nqus uas kuaj pom yog tias lub thawv khoom noj lub hau qhib lossis kaw. (Kuv sim nws nrog cov qaij hloov tab sis cov no qhov twg tsis ntseeg siab)

Tom qab lub sijhawm teeb tsa "minOpeningTime" ntawm qhib lub thawv pub lub hau - nws tau xav tias koj tsuas yog pub koj tus tsiaj - thiab lub sijhawm pub mis txee nce (yog tias koj lub sijhawm pub zaub mov yog 4 nws tau teeb rov qab rau 1).

Thaum koj qhib lub hau, LED lub teeb ci raws li lub sijhawm pub mis.

Thaum koj kaw lub hau, LED lub teeb ci raws li lub sijhawm pub mis (tshwj tsis yog koj kaw dua ua ntej "minOpeningTime" ntau dua).

Tom qab txo lub sijhawm pub mis los ntawm khawm qis, LED lub teeb ci raws li lub sijhawm pub mis tshiab.

Kauj Ruam 5: Kev Ntsuas Tus Qauv

Kho tsis tau
Kho tsis tau

minOpeningTime: thaum lub hau qhib rau ntau dua li lub sijhawm no ces lub txee yuav nce ntxiv.

lightenUpLEDs: thaum koj nias lub pob txhawm rau txheeb xyuas seb pes tsawg lub sij hawm koj tus tsiaj tau pub, lossis thaum koj qhib lossis kaw lub hau lossis thaum koj txo qis lub sijhawm pub zaub mov txee lub LED yuav ci rau lub sijhawm no.

Kauj Ruam 6: Txuas kab

Thaiv
Thaiv

Kauj Ruam 7: Cov Lus Qhia Ntxiv

Cov Lus Qhia Ntxiv
Cov Lus Qhia Ntxiv

Arduino xav tau nyob rau hauv ib txwm muaj txog 50mA. Nrog "LowPowerLibrary", qhov no tau txo qis hauv daim duab no kom tsawg dua 0.2mA. Yog li ntawd, hloov pauv roj teeb txhua hnub koj tuaj yeem ua qhov no ib xyoos ib zaug. Raws li "LowPowerLibrary" ua haujlwm, tsis muaj lub sijhawm thiab kuv siv tsis tau cov lus txib millis. (tsuas yog ncua ntawm "minOpeningTime")

Kev xa tawm Module rau Arduino Pro ua haujlwm ib txwm ua tau zoo ntawm Linux kev ua haujlwm - tab sis tsuas yog qee zaum ntawm Windows operating system. Nco ntsoov muab txoj cai sau rau ntawm chaw nres nkoj ntawm Linux ua ntej rub tawm. (saib cov lus hauv kab lus)

Pom zoo: