Cov txheej txheem:

IoT Cat Feeder Siv Particle Photon koom nrog Alexa, SmartThings, IFTTT, Google Sheets: 7 Cov Kauj Ruam (nrog Duab)
IoT Cat Feeder Siv Particle Photon koom nrog Alexa, SmartThings, IFTTT, Google Sheets: 7 Cov Kauj Ruam (nrog Duab)

Video: IoT Cat Feeder Siv Particle Photon koom nrog Alexa, SmartThings, IFTTT, Google Sheets: 7 Cov Kauj Ruam (nrog Duab)

Video: IoT Cat Feeder Siv Particle Photon koom nrog Alexa, SmartThings, IFTTT, Google Sheets: 7 Cov Kauj Ruam (nrog Duab)
Video: STRANGE NEWS of the WEEK - 10 | Mysterious | Universe | UFOs | Paranormal 2024, Kaum ib hlis
Anonim
Image
Image
IoT Cat Feeder Siv Particle Photon koom nrog Alexa, SmartThings, IFTTT, Google Sheets
IoT Cat Feeder Siv Particle Photon koom nrog Alexa, SmartThings, IFTTT, Google Sheets
IoT Cat Feeder Siv Particle Photon koom nrog Alexa, SmartThings, IFTTT, Google Sheets
IoT Cat Feeder Siv Particle Photon koom nrog Alexa, SmartThings, IFTTT, Google Sheets
IoT Cat Feeder Siv Particle Photon koom nrog Alexa, SmartThings, IFTTT, Google Sheets
IoT Cat Feeder Siv Particle Photon koom nrog Alexa, SmartThings, IFTTT, Google Sheets

Qhov xav tau rau tus pub miv tsis siv neeg yog tus kheej piav qhia. Miv (peb tus miv lub npe yog Bella) tuaj yeem ua rau tsis txaus siab thaum tshaib plab thiab yog tias koj tus miv zoo li kuv yuav noj lub tais qhuav txhua lub sijhawm. Kuv xav tau ib txoj hauv kev los faib cov khoom noj kom raug los ntawm 3 txoj hauv kev - 1. Alexa lub suab hais kom ua, 2. los ntawm lub sijhawm, thiab 3. los ntawm lub pob hauv SmartThings. Kuv kuj xav tau ib txoj hauv kev los taug seb yuav ua li cas thiab thaum twg miv tau pub mis yog li peb tsis pub ob zaug (qee zaum thaum kuv tus poj niam pub mis rau miv thiab tom qab ntawd kuv pub miv ntxiv 15 feeb tom qab).

Txoj haujlwm no tsis nyuaj dhau, Kuv tsis yog tus tsim tawm, lossis tus kws tshaj lij, tab sis muaj ntau yam peev txheej hauv online uas tau pab kuv. Kuv tab tom suav txhua yam kuv tau siv thiab txhua cov kauj ruam tsim nyog rau koj kom ua tiav txoj haujlwm no ib yam. Txaus siab rau, thiab zoo siab tsev!

Kauj Ruam 1: Tau Txais Txhua Yam Koj Xav Tau - Roughly $ 100

Tau Txais Txhua Yam Koj Xav Tau Cov Ntaub Ntawv - Roughly $ 100
Tau Txais Txhua Yam Koj Xav Tau Cov Ntaub Ntawv - Roughly $ 100

Nov yog txhua yam kuv tau yuav los ua tus pub miv no. Nws yog kwv yees li $ 100 uas yog me ntsis ntau dua li kuv tau npaj $ 75 tab sis mus rau qee qhov zoo dua qub kom ntseeg tau tias nws yuav nyob ntev. Qee cov ntaub ntawv kuv twb tau ua lub thawv zoo li ntoo nplaum, phom kub yaj, 18ga tus ntsia thawv, ntawv xuab zeb, muab ntoo, thiab lwm yam. Qhov no poob rau hauv "cov cuab yeej" hauv kuv lub tswv yim thiab tsis yog txhua yam tsim nyog. Kuv tsuas yog mus saum toj thiab dhau qee zaum ntawm kev ua tej yam zoo nkauj.

Yog tias koj hloov pauv los ntawm cov khoom lag luam tseeb no, tsuas yog xyuas kom koj lub servo muaj cov iav hlau thiab cim tus naj npawb ntawm cov hniav vim tias koj lub caj npab servo/horn yuav xav tau tus lej zoo tib yam ntawm cov hniav. Cov servo thiab caj npab teev hauv qab no yog 25T, lub ntsiab lus 25 hniav. Tsis tas li, Kuv tau siv lub yas yas ntawm thawj mus ncig thiab cov hniav raug tshem tawm hauv ib lub lis piam ntawm kev siv yog li tsis txhob mus rau txoj yas, tau hlau.

1. Particle Photon $ 19.99

2. Breadboard thiab Jumper xov hlau $ 7.69

3. Servo $ 19.99

4. Hlau servo arm/horn $ 8.98

5. Piezo Buzzer $ 5.05

6. Cov Kws Muab Tshuaj Kua Mis $ 14.95

7. Fiber board los ntawm khw kho vajtse rau lub thawv, 2 daim tsuas yog thaum koj cuam tshuam $ 20

8. Rustoleum Hammered Spray Paint $ 5.97

8. Lwm yam khoom xws li ntsia hlau, ntoo kua nplaum, ntsia hlau, ntawv xuab zeb, muab tub lim, thiab lwm yam.

Kauj Ruam 2: Teeb tsa Particle Photon

Thawj kauj ruam yog txuas koj li Particle Photon rau hauv internet. Qhov no yooj yim heev, tshwj xeeb nrog cov lus qhia los ntawm Particle. Rub tawm Particle app mus rau koj lub xov tooj, tsim ib tus account me me, thiab ua raws cov lus qhia kom nws txuas nrog koj lub wifi. Saib Video thiab ua raws cov lus qhia no!

docs.particle.io/guide/getting-started/start/photon/

Kauj Ruam 3: Txuas Cov Particle rau Servo, Breadboard, thiab Buzzer

Txuas Particle rau Servo, Breadboard, thiab Buzzer
Txuas Particle rau Servo, Breadboard, thiab Buzzer
Txuas Particle rau Servo, Breadboard, thiab Buzzer
Txuas Particle rau Servo, Breadboard, thiab Buzzer

Ok, tam sim no peb yuav tsum tau xaim cov khoom me me mus rau servo thiab buzzer siv lub khob cij. Txuas koj cov khoom me me rau ntawm daim ntawv tais diav tawm 2 tus pin qhov ntawm txhua sab, nws tsis muaj teeb meem tiag tiag qhov twg cov khoom me me tso rau sab nraud. Kuv tau muab kuv cov xov hlau txuas rau lub tswb nrov thiab tom qab ntawd siv cov kua nplaum kub los ruaj ntseg nws. Ib txoj hauv kev yooj yim dua yog siv cov khoom sib txuas lossis lub taub qab sib txuas thiab crimp lawv nrog pliers. Txog ntawm koj.

Txuas cov xov hluav taws xob servo:

VIN Liab servo hlau

A5 Yellow servo hlau

GND Dub servo hlau

Txuas lub xov tooj ntawm lub xov tooj (tsis muaj teeb meem uas yog qhov twg):

D0 Buzzer hlau

GND Buzzer hlau

Kauj Ruam 4: Teeb Txoj Cai rau Photon

Flashing Code rau Photon
Flashing Code rau Photon

Tam sim no koj muaj nws txuas, cia nyem lub teeb tsa firmware rau lub photon thiab sim tias lub suab nrov ua suab paj nruag thiab servo tig.

Nkag mus rau qhov tsim ua ntu me me siv koj tus lej

Nyem qhov chaws khawm ntawm sab laug toolbar. Luam thiab muab tshuaj txhuam tus lej muab (cat_feeder.c) rau hauv kev tsim console, hloov ib qho uas twb muaj lawm los ntawm lub neej ntawd.

Kev piav qhia me ntsis ntawm kev ua haujlwm pub mis. Txij li thaum pub mis tuaj yeem raug hu los ntawm 3 txoj kev sib txawv (khawm, lub suab, lub sijhawm) peb xav tau 3 cov lus txib sib txawv txhawm rau tshaj tawm txhua qhov xwm txheej yog li peb paub tias miv tau pub mis li cas. Cov lus txib no yog "bfeed" thaum pub los ntawm lub pob, "sfeed" thaum pub los ntawm lub sijhawm thiab "vfeed" thaum pub los ntawm lub suab hais kom ua.

Nyem rau daim nplaub tshev nrhiav khawm kom txuag koj cov cai, muab nws lub npe ntawm qhov koj xaiv.

Nyem lub pob pov thawj (nws zoo li kos cim nrog lub voj voog ncig nws). Tom qab ob peb lub sijhawm koj yuav tsum pom hauv qab kab xwm txheej:

Sau ua ke… Txoj cai pov thawj. Ua haujlwm zoo! Npaj txhij

Tam sim no, Nyem rau Flash khawm ntawm lub cuab yeej sab laug (zoo li lub teeb nrig). Tom qab ob peb lub sijhawm koj yuav tsum pom hauv qab kab xwm txheej:

Teeb nyem… Flash ua tiav! Koj lub cuab yeej raug hloov tshiab. Npaj txhij

Tom ntej no, nkag mus rau lub particle console

Nyem rau ntawm koj Particle Photon. Nov yog nplooj ntawv xwm txheej rau koj lub cuab yeej, koj tuaj yeem pom hauv Cov Ntawv Cuam Tshuam thaum ua cov haujlwm, xws li cov lej ntsais muag lossis thaum cov xwm txheej tau tshaj tawm los ntawm kev xa cov lus txib pub. Txhawm rau pib ua cov lus txib pub mis koj yuav siv Cov Pobzeb Ua Haujlwm ntawm sab xis ntawm lub console no. Txij li txoj haujlwm tau hu ua "pub" hauv cov cai, koj yuav tsum pom nws thiab lub thawv nkag sib cav.

Ntaus "bfeed" hauv lub thawv tawm tswv yim thiab nyem Hu.

Qhov no yuav tsum ua suab paj nruag thiab tom qab ntawd tig lub servo. Yog tias koj xav tau, txhawm rau ntsuas lub hom phiaj, hloov lub sijhawm ncua hauv txoj cai los ntawm 330 MS rau qee yam ntev dua li 5000 yog tias koj xav txheeb xyuas qhov kev xa khoom servo. Koj yuav tsum nyem lub pob nyem txhua lub sijhawm koj hloov pauv cov cai. Tej zaum koj yuav xav tau kho qhov ncua sijhawm tom qab kom tau txais qhov xav tau ntawm tig (xws li pub zaub mov rau dev, koj yuav xav faib zaub mov ntau dua).

Kauj Ruam 5: Ua Lub Thawv Rau Tsev Txhua Yam

Ua Ib Lub Tsev rau Txhua Lub Tsev
Ua Ib Lub Tsev rau Txhua Lub Tsev
Ua Ib Lub Tsev rau Txhua Lub Tsev
Ua Ib Lub Tsev rau Txhua Lub Tsev
Ua Ib Lub Tsev rau Txhua Lub Tsev
Ua Ib Lub Tsev rau Txhua Lub Tsev

Cov kauj ruam no suav nrog koj cov txuj ci zoo ntawm cov kws ntoo. Kuv yuav 2 -2x4ft cov laug cam los ua lub thawv vim nws muaj zog, du rau qhov kov, tus nqi pheej yig, thiab yooj yim rau kev txiav/ua haujlwm nrog. Koj tuaj yeem xaiv cov khoom siv twg. Cov kauj ruam no yog tiag tiag ntawm koj kev txiav txim siab hauv kev tsim nws li cas vim tias txhua tus neeg muaj kev xav tau sib txawv. Kuv yuav tsis muaj cov ncauj lus ntxaws ntxaws ib kauj ruam rau ua lub thawv tab sis kuv tuaj yeem qhia cov txheej txheem kev xav thiab cov txheej txheem uas kuv tau siv.

Muaj ntau tus lej uas kuv tau txiav txim siab rau kev tsim lub thawv. Kuv xav tau qhov no kom nruj me ntsis. Kuv xav kom nws pab tau yooj yim rau kev ntxuav thiab/lossis kho nws yog tias nws puas tau ua haujlwm tsis zoo. Thaum kawg, Kuv xav kom lub raj xa dej nthuav tawm yog li kuv tuaj yeem pom pom thaum cov zaub mov poob qis. Nrog qhov no hauv siab kuv tau ua lub thawv ua ntej thiab tom qab ntawd ntsuas sab hauv sab hauv kom ua ib lub xwmfab thav duab uas lub chaw faib khoom, servo, thiab pawg thawj coj tau txuas nrog. Txoj kev no tag nrho chav tuaj yeem nqa tawm ntawm lub thawv rau kev pabcuam. Saib cov duab.

Kauj Ruam 6: SmartThings Device Handlers

SmartThings Device Handlers
SmartThings Device Handlers
SmartThings Device Handlers
SmartThings Device Handlers
SmartThings Device Handlers
SmartThings Device Handlers

Cov kauj ruam no piav qhia yuav ua li cas txhawm rau siv hu xov tooj pub dawb siv SmartThings thiab Alexa. Txhawm rau ua qhov no kuv yuav tsum tau sau 2 cov cuab yeej cuab tam groovy. Ib tus neeg tuav haujlwm yog rau "bfeed" thaum kuv nias lub pob hauv SmartThings thiab lwm tus tuav yog rau "vfeed" thaum kuv thov Alexa pub Bella los ntawm lub suab hais kom ua. Lwm qhov laj thawj kom muaj 2 tus neeg ua haujlwm sib txawv yog tias Alexa tsuas lees paub cov cuab yeej uas hloov pauv, tsis yog khawm. Yog li kuv yuav tsum ua kom Alexa lees paub qhov hloov pauv txhawm rau txhawm rau ua haujlwm (tawm thiab ua tib yam nkaus). Ok, cia peb pib ua.

ID nkag mus (lossis tsim tus as khauj) rau IDE SmartThings portal ntawm https://ide.smartthings.com siv koj li Samsung Account lossis SmartThings account.

Txheeb xyuas koj lub SmartThings hub qhia tawm hauv qab "Kuv Qhov Chaw" thiab "Kuv Lub Chaw". Yog tias nws tsis qhia, daws qhov no ua ntej txuas ntxiv.

Peb yuav tsim lub Butler Handler ua ntej

Nyem rau "My Device Handlers" nyob rau sab saum toj bar qhia.

Nyem rau ntawm lub pob xiav "Tsim Tus Ntaus Ntaus Tshiab"

Xaiv "Los ntawm Cov Cai" tab thiab muab cov lej tso rau hauv los ntawm cov ntawv txuas nrog button_handler.groovy. Ces Nyem Tsim.

Nyem "Txuag" thiab "Tshaj Tawm" "Rau Kuv". Koj yuav tsum pom daim ntawv ceeb toom ntsuab tshwm uas hais tias, "Hom ntaus ntawv tau tshaj tawm ua tiav."

Tam sim no, dhia hla koj lub xov tooj thiab qhib SmartThings app. Koj yuav tsum pom tus tuav haujlwm zoo li lub cuab yeej tshiab. Koj yuav tsum tau teeb tsa tus tuav haujlwm yog li nws tshaj tawm rau koj lub cuab yeej ua haujlwm. Xaiv cov cuab yeej tsim tshiab thiab qhib Chaw (zoo li lub iav icon).

Ntaus Ntaus Npe - Npe lub cuab yeej txhua yam koj xaiv, Kuv paub tseeb tias koj tus miv kuj tsis muaj npe Bella.

Nkag mus rau Token - Kev nkag mus token yuav raug pom nyob hauv Particle Build console https://build.particle.io/ hauv qab Cov Chaw (iav icon nyob hauv qab sab laug). Access Token yuav yog 40 tus cim.

Nkag mus ID Tus lej - Tus lej ntaus ntawv tau pom ntawm nplooj ntawv Particle Console raws li 24 tus ntawv cim thiab tseem pom nyob hauv txhua qhov me me URL's thaum koj nkag rau hauv koj tus as khauj ua haujlwm ntawm koj lub cuab yeej. Ntaus ID pom BOLD hauv URL:

Nyem Txuag.

Nyem rau Pub khawm!

Los ntawm txhaj rau lub pob pub koj yuav tsum hnov lub suab nkauj thiab tau txais servo tig. Koj kuj yuav tsum tau pom cov xwm txheej tshaj tawm hauv cov txheej xwm txheej txheej txheej xwm txheej cav.

Tom ntej no, peb yuav tsim Tus Ntaus Tus Kheej rau Alexa

Ua raws cov txheej txheem tib yam li saum toj no. Mus rau IDE SmartThings portal thiab Nyem rau ntawm "Kuv Tus Kheej Cov Neeg Siv Khoom" nyob rau sab saum toj bar bar. Nyem rau xiav khawm "Tsim Tus Ntaus Ntaus Tshiab"

Xaiv "Ntawm Txoj Cai" tab thiab muab cov chaws tso rau hauv los ntawm cov ntawv txuas alexa_handler.groovy. Ces Nyem Tsim.

Nyem "Txuag" thiab "Tshaj Tawm" "Rau Kuv". Koj yuav tsum pom daim ntawv ceeb toom ntsuab tshwm uas hais tias, "Hom ntaus ntawv tau tshaj tawm ua tiav."

Tam sim no, dhia rov qab rau koj lub xov tooj thiab qhib SmartThings app. Koj yuav tsum pom tus tuav haujlwm zoo li lub cuab yeej tshiab tab sis lub sijhawm no tsis muaj khawm. Koj yuav tsum tau teeb tsa tus tuav nrog koj li Access Token thiab ID ID ib yam li koj tau ua yav dhau los.

Xaiv cov cuab yeej tsim tshiab hauv SmartThings thiab qhib Cov Chaw (zoo li lub cim iav).

Ntaus Ntaus Npe - Npe lub cuab yeej txhua yam koj xaiv, Kuv hu nws "Cat Feeder Handler for Alexa" yog li kuv tus poj niam paub nws tsis yog Cat Feeder khawm.

Nkag mus rau Token thiab Ntaus Ntaus Tus ID, tom qab ntawd nyem Txuag.

Tam sim no, qhib koj lub Alexa App ntawm koj lub xov tooj. Yog tias koj tsis tau ua li ntawd ua ntej, qhib SmartThings Alexa Skill thiab txuas koj li SmartThings tus account rau Alexa App. Tom qab ntawd mus rau Smart Home screen thiab nyem "Ntxiv Device". Qhov no tseem tuaj yeem ua tiav los ntawm kev hais "Alexa, tshawb pom cov cuab yeej". Ib lub cuab yeej yuav tsum tshwm nrog lub cim hloov pauv, nws yuav muaj npe txhua yam koj hu ua tus tuav haujlwm hauv SmartThings. Koj tuaj yeem hloov lub npe ntawm nws hauv Alexa app yog tias koj xav tau tab sis nco ntsoov tias qhov no yog hom hloov pauv yog li nws yuav xav hais tias "Alexa, qhib" lossis "Alexa, tua". Kuv paub qhov no tsis zoo hais "Qhib tus miv pub mis" yog li lwm txoj hauv kev yog los tsim cov haujlwm tshiab hauv Alexa app thiab hu nws nrog kab lus koj xav tau raws nraim. Kuv tau ua ntu zus hu ua "Pub Bella" uas tig rau tus miv pub hloov.

Los ntawm txhaj rau qhov hloov pauv hauv Alexa app, tam sim no koj yuav tsum ua tiav hu xov tooj pub muaj nuj nqi. Particle Console qhov xwm txheej cav yuav tsum tshaj tawm cov xwm txheej qhia qhov ntawd.

Thaum koj muaj txhua yam muaj npe raws li txoj kev koj xav kom nws mus tom ntej thiab sim nws!

Kauj Ruam 7: Muab tag nrho ua ke

Muab Nws Tag Nrho Ua Ke
Muab Nws Tag Nrho Ua Ke
Muab Nws Tag Nrho Ua Ke
Muab Nws Tag Nrho Ua Ke
Muab Nws Tag Nrho Ua Ke
Muab Nws Tag Nrho Ua Ke
Muab Nws Tag Nrho Ua Ke
Muab Nws Tag Nrho Ua Ke

Qhov kawg kuv tsis tau npog yog yuav teem sijhawm li cas pub thiab sau cov xwm txheej tshaj tawm hauv Google Ntawv. Tej zaum koj yuav xav tias Alexa App tuaj yeem siv los ua ntu zus rau lub sijhawm tab sis qhov no yuav tsis tso cai rau peb teev sijhawm raws lub suab hais kom ua lossis khawm. Yog li qhov hloov pauv, muaj IFTTT applet rau cov khoom qub uas peb yuav siv.

Cia peb tsim IFTTT applet rau kev teem sijhawm pub mis

Mus rau https://ifttt.com lossis rub tawm IFTTT smartphone app thiab nkag mus (tsim tus as khauj yog xav tau)

Yog tias koj yog tus tshiab rau IFTTT nws ncaj nraim rau pem hauv ntej. Txhua lub applet suav nrog IF (ib qho xwm txheej lossis cuam tshuam) thiab TSEEB (qee qhov kev nqis tes ua).

Yog li ib zaug nkag mus rau IFTTT, tsim daim ntawv thov tshiab, xaiv IF thiab tshawb nrhiav lossis xaiv "Hnub thiab Sijhawm". Koj teeb tsa qhov no rau txhua lub sijhawm koj xav tau. Tom qab ntawv ua raws cov kauj ruam thiab ib zaug koj tau mus rau qhov uas koj yuav tshawb rau "Particle" thiab xaiv "Hu Ua Haujlwm". Ua kom tiav cov teb raws li hauv lub vijtsam saum toj no, nco ntsoov siv "sfeed" raws li kev tawm tswv yim raws li qhov no yog cov lus txib xav tau tshaj tawm "Fed raws sijhawm" qhov xwm txheej. Koj yuav xav tau txuas lossis nkag mus rau koj tus lej nyiaj thaum teeb tsa daim ntawv thov no. Txuag lub applet thiab koj yuav tsum zoo mus. Yog tias koj xav sim, tsuas yog hloov hnub thiab sijhawm kom ze rau yav tom ntej thiab pom tias nws ua kom raug.

Tam sim no los tsim IFTTT cov ntawv thov rau tuav 3 yam xwm txheej

Muaj 3 cov lus txib peb xav tau rau tus account thaum tus miv pub mis khiav. Cov no yog cov cim nyuaj hauv cov khoom me me:

Bella pub los ntawm lub sijhawm Bella pub los ntawm khawm Bella pub los ntawm lub suab hais kom ua

Yog tias koj tus tsiaj tsis muaj npe "Bella" koj yuav xav hloov qhov no hauv cov khoom lag luam, thiab rov nyem dua. Hloov cov ntawv hauv kab ntawv Particle.publish ntawm cov lej ua lej.

Tsim qhov tshiab IFTTT applet. (yuav tsum ua qhov no 3 zaug, rau txhua qhov xwm txheej)

Pib nrog IF, tshawb rau Particle thiab xaiv "Tshaj tawm qhov xwm txheej tshiab". Lub Npe Lub Npe yuav tsum yog lub npe tseeb tshaj tawm Lub Npe Txheej Txheem uas koj muaj hauv koj li firmware. Piv txwv "Bella pub los ntawm lub sijhawm" yog lub sijhawm tshwm sim lub npe tseeb hauv cov cai kuv tau muab rau koj. Txheeb tawm qhov screenshot raws li kuv tau sau nws rau kev siv. Koj yuav tsum tsim 2 qhov IFTTT ntxiv los lis lwm cov xwm txheej ib yam nkaus. Daim ntawv thov no yuav tsim ib daim ntawv tshiab hauv koj li google drive yog tias nws tsis muaj nyob lawm thiab teev cov xwm txheej tshiab rau kab tom ntej no.

Pom zoo: