Cov txheej txheem:

Noog Feeder Saib: 7 Kauj Ruam (nrog Duab)
Noog Feeder Saib: 7 Kauj Ruam (nrog Duab)

Video: Noog Feeder Saib: 7 Kauj Ruam (nrog Duab)

Video: Noog Feeder Saib: 7 Kauj Ruam (nrog Duab)
Video: 6 Nqi Lus Qhia Kev Ua neej ( leej twg mloog lub neej yuav zoo tuaj) 2024, Hlis ntuj nqeg
Anonim
Noog Feeder Saib
Noog Feeder Saib

Nov yog txoj haujlwm los tshuaj xyuas tus naj npawb ntawm cov noog uas tuaj ntsib kuv tus noog pub mis, nrog rau sau cov sijhawm siv sijhawm pub mis. Kuv siv Arduino Yún thiab lub peev xwm kov lub ntsej muag, Adafruit CAP1188, txhawm rau txheeb xyuas thiab sau cov noog noj. Nyob rau niaj hnub, cov ntaub ntawv khaws tseg raug xa mus rau Google Docs spreadsheet kom sau tus lej thiab sijhawm siv los ntawm cov noog mus ntsib tus pub mis.

Cov ntaub ntawv tsuas yog xa tawm thaum lub sijhawm teev tseg ua ntej hnub tuaj thiab tom qab hnub poob.

Kauj Ruam 1: Qhov Chaw

Qhov
Qhov

Cov no yog cov npe ntawm cov ntu uas kuv tau siv los ua ke kuv qhov project. Koj tuaj yeem siv ntau lub thawv phiaj xwm los tsim koj txoj haujlwm, tab sis cov no yog cov khoom kuv muaj ntawm tes thaum lub sijhawm.

1 6x3x2 "Project Enclosure1 3x2x1" Project Enclosure1 roll 1/4 "Copper Foil Tape1 CAP1188 8-Key Capacitive Touch Sensor1 Arduino Yun1 micro-SD card 2 DB-9 txiv neej txuas 2 DB-9 poj niam txuas 1 Bird Feeder (CedarWorks Yas Hopper Bird Feeder) 1 Tail Light txuas los ntawm lub khw muag khoom tsheb

Kauj ruam 2: Kev thaiv kab

Thaiv
Thaiv

Arduino Yun thiab CAP1188 tau txuas los muab lub zog rov pib dua ntawm lub sensor thaum pib. Muaj lwm lub peev xwm kov lub ntsej muag muaj nrog ib qho, tsib lossis yim lub cim. Kuv xaiv yim vim kuv tus noog noj muaj rau sab.

Thaiv:

CAP1188 SDA == Yún Digital 2 CAP1188 SCK == Yún Digital 3 CAP1188 RST == Yún Digital 9 CAP1188 VIN == Yún 3.3V lossis 5V CAP1188 GND == Yún GND CAP1188 C1-C8 == Txuas rau xov hlau ntawm txhua qhov

Lub zog rau Arduino tau muab sab nrauv, los ntawm kev xaim hluav taws xob hauv av los ntawm kuv lub nkas -las, thiab nce los ntawm cov yeeb nkab siv los ua tus noog pub zaub sawv ntsug. Cov xaim tau txuas nrog lub hwj chim 5-VDC hauv chav nres tsheb. Txoj haujlwm no yuav tsum ua haujlwm nrog roj teeb, tab sis kuv tsis xav kom hloov pauv cov roj teeb ib txwm ua.

Kuv tsim lub 16 ntev cable nrog DB-9 txuas ntawm ob qho kawg los txuas rau Project Box nrog Arduino Yun thiab lub thawv uas muaj CAP1188. Lub peev xwm ntsuas hluav taws xob xav tau nyob ze rau qhov perches li sai tau.

Kauj Ruam 3: Txhim Kho Python Pob thiab Sau Ntawv

CAP1188 xav kom koj rub tawm thiab teeb tsa lub tsev qiv ntawv rau lub ntsuas cua no. Lub tsev qiv ntawv tuaj yeem pom ntawm qhov chaw hauv qab no:

github.com/adafruit/Adafruit_CAP1188_Library/archive/master.zip

Cov lus qhia rau kev txhim kho lub tsev qiv ntawv thiab piv txwv nyob hauv README.txt cov ntaub ntawv hauv lub zip ntim.

Txoj haujlwm no saib xyuas lub hnub tuaj & hnub poob rau koj qhov chaw tshwj xeeb, thiab pib suav thiab sijhawm raws lub sijhawm tshwj xeeb ua ntej hnub tuaj thiab rau lub sijhawm sib npaug tom qab hnub poob. Ua ntej thiab tom qab lub sijhawm ntawd, tsis muaj cov ntaub ntawv xa mus rau koj daim ntawv teev npe. Txoj haujlwm no siv tsab ntawv nab nab los nyeem cov ntaub ntawv hnub tuaj thiab hnub poob los ntawm Yahoo! huab cua txhua hmo lossis thaum pib tau txais cov sijhawm no.

Cov tsev qiv ntawv nab nab hauv qab no xav tau rub tawm thiab teeb tsa ntawm Arduino Yún.

nab hab sej-huab cua-apipywapi-https://code.google.com/p/python-weather-api/

Cov lus qhia rau kev txhim kho lub tsev qiv ntawv no nyob ntawm lub vev xaib saum toj no.

Python ScriptsThe ID chaw nyob hauv 'getastonomy.py' cov nab hab sej tsab ntawv xav tau hloov kho kom suav nrog koj qhov chaw nyob. Tam sim no nws tau teeb tsa rau Sugar Land, Texas. Ib txoj hauv kev kom pom koj tus ID yog mus rau lub vev xaib hauv qab no:

Huab Cua Qhov Codes

Sau koj qhov chaw nyob, thiab koj qhov chaw nyob ID yuav tshwm. Hloov USTX1312 hauv kab kab ntawv nrog koj tus lej ID.

result = npw. get_weather_from_weather_com ('USTX1312')

Qhov no yuav tso cai rau tsab ntawv mus rau lub hnub tuaj thiab hnub poob rau koj qhov chaw nyob. Cov lus qhia rau kev hloov kho 'sendgdocs.py' nyob hauv Kauj Ruam 6.

Thaum ob tsab ntawv tau hloov pauv koj yuav tsum txav lawv mus rau hauv phau ntawv teev npe micro-SD '/mnt/sda1/' ntawm Arduino Yun.

Kauj Ruam 4: Txuas Tus Noog Feeder

Txuas Tus Noog Feeder
Txuas Tus Noog Feeder
Txuas Tus Noog Feeder
Txuas Tus Noog Feeder

Txhua qhov txuas ntawm tus pub mis tau npog nrog 1/4 dav tus kheej nplaum tooj liab daim kab xev daim kab xev. Lub qhov me me tau dhau los ntawm kab xev thiab txuas, thiab xaim tau muab txuas rau daim kab xev thiab hla hauv qab tus pub mis.

Nco tseg: Nrog tus noog pub rau pom saum toj no, Kuv pom zoo qhov sib txawv nruab nrab ntawm qhov kawg ntawm txhua daim ntawv ci ntawm 1 1/4 " - 1 1/2". Kuv pom tias cov noog loj dua, xws li cov nyom thiab nquab, muaj peev xwm kov tau ob daim ntawv ci tib lub sijhawm yog tias lawv muab tso rau ze ua ke.

Ib qho ntoo tau zoo li tus thiab ua rau sab hauv qab ntawm tus neeg pub khoom noj kom muab thaj tsam ib qib los txhawm rau txhawm rau Project Box uas muaj CAP1188. Velcro daim kab xev tau thov rau Project Box nrog rau cov ntoo thaiv kom muab txoj hauv kev txuas nrog.

Txhawm rau txhawm rau ntxiv cov noog pub mis, kuv tshem lub hwj chim sab hauv lub nkas -las. Tom ntej no, Kuv txiav DB-9 txuas los ntawm Project Box txuas rau hauv qab ntawm tus pub khoom noj, uas tso cai rau kuv nqa lub tshuab pub mis tawm ntawm cov yeeb nkab nrog Project Box tseem txuas rau hauv qab. Thaum cov khoom noj tau rov ua dua, kuv tso nws rov qab rau ntawm cov yeeb nkab sawv ntsug; txuas DB-9 cable; thiab ntsaws lub zog.

Kauj ruam 5: Tsim Google Doc Form

Tsim daim ntawv Google Doc
Tsim daim ntawv Google Doc

Txhawm rau xa cov ntaub ntawv Google Docs daim ntawv nthuav tawm, koj yuav tsum xub tsim Daim Ntawv nrog txhua qhov uas yuav tsum tau ua. Hauv kuv qhov piv txwv, Kuv muaj rau 'cnt' cov teb thiab rau 'lub sijhawm' cov teb uas yog cov lej nkag mus. Piv txwv, cov teb muaj npe 'cnt1', 'time1', 'cnt2', 'time2', thiab lwm yam. Thaum koj ua tiav nrog Daim Ntawv, koj nyem "Saib daim ntawv nyob" kom pom daim ntawv tiav. Thaum saib Daim Ntawv, nyem rau ntawm nplooj ntawv thiab xaiv "Saib nplooj ntawv qhov chaw". Tshawb nrhiav thiab pom txhua qhov HTML "nkag" cov teb hauv qhov chaws. Sau ib lub npe rau txhua daim teb uas koj nkag rau hauv daim foos. Cov ntaub ntawv no xav tau los tsim koj li xwm txheej hauv PushingBox.

Kauj Ruam 6: Kho PushingBox

Configuring PushingBox
Configuring PushingBox
Configuring PushingBox
Configuring PushingBox

Sau ntawv ceeb toom ntawm qhov chaw nyob url ntawm Daim Ntawv uas koj tau tsim yav dhau los (thaum saib daim ntawv ua tiav), thiab luam qhov chaw nyob ntawd. Nws yuav tsum zoo li qhov chaw nyob no:

"https://docs.google.com/forms/d/42QRHPzZzI4fdMZdC4…EbF8juE/viewform"

Qhov chaw nyob no yog siv los tsim koj li PushingBox Service, tshwj tsis yog tias nws yuav tsum xaus nrog ' /formResponse' hloov ' /viewform'. Thaum kawg, nco ntsoov hloov Txoj Kev Siv los ntawm Kev Pabcuam rau POST.

Tsim Tus Qauv Hauv PushingBox yuav xav tau cov ntaub ntawv sau ua ntej los ntawm daim ntawv rau txhua qhov ntawm cov lus teb. Tsim CustomURL hom Scenario raws li pom hauv daim duab saum toj no. Nws yuav tsum zoo li qhov no:

entry.184762354 = $ cnt1 $ & entry.1970438117 = $ ti … 6352124 = $ cnt6 $ & entry.54370319 = $ time6 $ && xa = Xa

Txhua qhov nkag yuav tsum phim tus 'cnt' thiab 'sijhawm' cov teb ntawm koj daim ntawv. Xaus txoj hlua ntawm cov teb nrog '&& xa = Xa' raws li pom saum toj no.

Tus ID ntaus ntawv tsim nrog koj li xwm txheej yuav xav tau hauv 'sendgdocs.py' nab hab sej tsab ntawv txhawm rau xa cov ntaub ntawv mus rau Google Docs ntawm PushingBox.

Kauj Ruam 7: Cov Ntaub Ntawv

Cov Ntaub Ntawv
Cov Ntaub Ntawv
Cov Ntaub Ntawv
Cov Ntaub Ntawv

Tam sim no txoj haujlwm no tau teeb tsa los sau thiab xa cov ntaub ntawv rau Google Docs txhua 20 feeb. Lub sijhawm ntawd tuaj yeem hloov kho tau yooj yim hauv daim duab

Cov ntaub ntawv xa tuaj yog "suav" ntawm tus naj npawb ntawm cov noog (lossis qee yam khoom siv) kov cov ntawv tooj liab ntawm lub perch. Nws tseem xa tag nrho lub sijhawm (vib nas this) tus noog kov lub sensor thaum pub mis.

Kuv tau ntsib cov txiaj ntsig sib txawv. Txhua yam nws nyob ntawm qhov pub kuv muab, thiab cov noog uas nyob hauv thaj chaw. Yog tias cov nyom nyob hauv thaj chaw, lawv tuaj yeem tso cov noog pub rau hauv qhov kev txiav txim. Lawv muaj peev xwm tawg cov khoom noj nrog lawv cov beaks txhua qhov chaw sai heev.

Kuv muaj ob tus noog pub mis, tab sis tsuas yog ib tus muaj lub ntsuas saib. Yog li ntawd, kuv cov ntaub ntawv qhia tias kuv tau txais nruab nrab ntawm 1, 000 txog 1, 400 suav nruab nrab ntawm kev rov ua dua, thiab lub peev xwm ntawm tus pub mis yog 6 lbs. Txawm li cas los xij, qee qhov ntawm cov suav yog suav ob zaug vim yog cov noog hla ntau dua ib qho. Hauv txhua qhov xwm txheej, nws tau lom zem saib tus pub mis, thiab tshuaj xyuas cov ntaub ntawv.

Pom zoo: