Cov txheej txheem:
- Kauj Ruam 1: Cov Khoom Tseem Ceeb Yuav Tsum Tau
- Kauj ruam 2: Qhov System
- Kauj Ruam 3: Coding Sijhawm
- Kauj Ruam 4: Muab Nws Ua Ke
- Kauj Ruam 5: Cov txiaj ntsig
- Kauj Ruam 6: Qhov Tsis Zoo
Video: Cat-a-way-Computer Vision Cat Sprinkler: 6 Cov Kauj Ruam (nrog Duab)
2024 Tus sau: John Day | [email protected]. Kawg hloov kho: 2024-01-30 09:27
Teeb meem - Miv siv koj lub vaj ua chav dej
Kev daws teeb meem - Siv sijhawm ntau dhau ntawm kev tsim cov tshuab txau miv nrog pib youtube upload yam ntxwv
Qhov no tsis yog ib kauj ruam zuj zus, tab sis qhia txog kev tsim kho thiab qee qhov chaws
#BeforeYouCallPETA - Cov miv zoo, nws yog lub tshuab tso dej tsis tshua zoo ib yam li los nag, kom lawv tuaj yeem nrawm dua ua ntej nws txawm piv rau lawv. Txoj haujlwm no tsis yog kom tsau tus miv, tab sis kom qhia lawv tawm ua ntej lawv pov kuv lub vaj nrog cov miv version ntawm Barkers Eggs.
Kauj Ruam 1: Cov Khoom Tseem Ceeb Yuav Tsum Tau
Raspberry Pi xoom & SD daim npav
Raspberry Pi lub koob yees duab
Relay
555 lub sijhawm…. (lossis arduino thiab lwm qhov xa tawm yog tias koj 555 lub sijhawm tsis tuaj txog)
Solenoid
Sprinkler
Qee lub tsev nyob rau cov khoom siv hluav taws xob
Kev txaus siab los ntaus tus ntsia thawv ua piv txwv nrog rau 6 tonne sledge rauj
Lub koob yees duab nrog qhov kev daws teeb meem me me koj tsis tuaj yeem pom dej, tab sis tseem tuaj yeem pom cov miv khiav rau npog
Kauj ruam 2: Qhov System
1, Pi lub koob yees duab pom lub miv qhov khoom txav mus rau ob peb lub koob yees duab thav duab (piav qhia nyob rau theem tom ntej)
2, Pi teeb tawm lub taub dej
3, Miv khiav rau npog
4, Cov vis dis aus tau tso rau hauv youtube kom pom kev lom zem
Kauj Ruam 3: Coding Sijhawm
Siv openCV siv cov lej rho tawm koj tuaj yeem pom thaj tsam ntawm tus ncej uas hloov pauv lub sijhawm, siv qee qhov kev ua haujlwm tsis zoo koj tuaj yeem txiav txim siab qhov kev hloov pauv loj npaum li cas thiab yog tias lawv ua rau lub sijhawm dhau mus, thiab tseem ceeb tshaj plaws yog tias lawv yog miv loj.
Muaj qee qhov kev qhia ntau ntawm cov lej rho tawm uas mus rau hauv cov ncauj lus zoo yog tias koj ua google tshawb nrawm.
Txheej txheem cej luam ntawm txoj cai ua haujlwm li cas
1, Lub koob yees duab khaws cov ntas thiab muab piv rau qhov kawg
2, Yog tias pom tus miv zoo li tus duab nws tau sau tseg
3, Yog tias tus miv qhov kev hloov pauv hloov pauv nyob ib puag ncig 4 thav duab pi siv nws GPIO los hloov lub zog pib arduino
4, Arduino xa lub teeb liab mus rau lub zog thib ob txuas rau 5 vib nas this uas qhib lub solenoid
5, Lub solenoid thaum siv hluav taws xob tso cai rau cov dej mus rau lub kais dej
6, Thaum lub kais tsuag dej ua haujlwm lub koob yees duab nres pom thiab kaw cov vis dis aus
7, Cov vis dis aus tau tso rau hauv Youtube
8, Cov kab ntawv rub tawm rau hauv lub thawv rau kev kho kom raug
Nco tseg - Vim li cas kuv thiaj li siv 2 qhov txuas thiab cov arduino tig rau solenoid li 5 vib nas this…..
1, Tus pi tsis tuaj yeem pib thiab nres lub solenoid thaum kaw cov vis dis aus raws li nab nab tso tawm ib ntus kom txog thaum cov vis dis aus tiav, yog li xav tau arduino (lossis 555 timer) tso cai rau solenoid qhib thiab kaw qhov ywj pheej rau tsab ntawv thaum video tseem kaw.
2, Thawj qhov xa tawm thiab arduino tuaj yeem hloov pauv nrog 555 lub sijhawm tab sis qhov ntawd tsis tuaj txog hauv lub sijhawm rau qhov haujlwm no, 555 yuav txuag sijhawm thiab nyiaj ntau.
3, Tus pi tsis tuaj yeem ua rau solenoid ncaj qha raws li Pi GPIO ua haujlwm ntawm 3.3v thiab 51mA max, thiab solenoid xav tau 5V thiab ntau dua 51mA los ua kom pom.
4, Txhua lub thav duab tuaj yeem raug txiav kom tshem tawm cov lus pom hauv thaj chaw tsis xav tau, xws li lub vaj neigbors. Ua tsis tiav qhov no yuav ua rau tus neeg nyob ze hais lus tsis zoo saib rau hauv koj lub vaj vim tias lub tshuab tso dej tawm mus txhua lub sijhawm nws xav nkag mus rau hauv nws lub tsev.
5, Kuv tej zaum tsis pom qee yam pom tseeb thiab nkim kuv lub sijhawm teeb tsa nws zoo li no.
Code hauv qab no
ntshuam cv2import numpy li np ntshuam argparse #cat lub sijhawm ntshuam RPi. GPIO li GPIO ntshuam os ntshuam poob ntawm picamera.array ntshuam PiRGBArray los ntawm picamera ntshuam PiCamera #------------------ ------------------------------ Upload rau youtube ----------------- ---------------------- def HDtoYoutube (): ctime = time.strftime ("_%H-%M-%S") cdate = sijhawm.strftime ("_%d-%m-%Y") vidname = ctime + cdate #Trigger relay GPIO.output (11, True) time.sleep (.5) GPIO.output (11, False) print ("Noj Video") sim: #Take Video os.system ('raspivid -w 1640 -h 922 -o vid {0}.h264 -t 15000'.format (vidname)) #Upload to youtube print ("Uploading to YouTube") os. system ('sudo youtube-upload -title = "Cat Got Wet {0}" --client-secrets = client_secret.json vid {0}.h264'.format (vidname)) #Remove video file thaum ua os.remove ('vid {0}.h264'.format (vidname)) print ("Video uploaded and removed from Pi") except: pass #-------------------- ------------------------------ Tseem tshuav qhov nco ---------------------- ---------------------- def St. illsToDropbox (): print ("Uploading Still To Dropbox Function") access_token = 'Ah ah ah, koj tsis tau hais lo lus khawv koob … Ah ah ah, koj tsis tau hais lo lus khawv koob' ctime = time.strftime (" %H:%M:%S ") cdate = time.strftime ("%d-%m-%Y ") sim: filename =" /Motion/{0}/DetectedAt_{1}.jpg".format(cdate, ctime) print (filename) client = dropbox.client. DropboxClient (access_token) duab = qhib ("ToDropbox.jpg", 'rb') client.put_file (filename, duab) image.close () os.remove ("ToDropbox-j.webp
#HowToTriggerRealProgrammersWithBadCode
Kauj Ruam 4: Muab Nws Ua Ke
Cram cov hluav taws xob mus rau hauv lub tsev tsis muaj dej, ntswj yam khoom rau hauv phab ntsa thiab siv ntau daim kab xev thiab cov kua nplaum kub
Kauj Ruam 5: Cov txiaj ntsig
Thaum nws ua haujlwm nws ua haujlwm
Kauj Ruam 6: Qhov Tsis Zoo
Thaum nws tsis nws txau cov duab ntxoov ntxoo miv, koj tus poj niam thiab koj tus ntxhais.
Pro -tip - Muab qhov hloov pauv los ntawm lub qhov rooj uas ua rau qhov ntsuas pom qhov kev pab cuam….. tom qab ntawd tsis nco qab siv nws thiab tau ntub thaum tso lub thoob.
Vam tias kuv tau ua ib tus kws tshaj lij hauv kev ua haujlwm, khoom siv hluav taws xob thiab DIY cringe nrog txhua qhov yuam kev kuv tej zaum tau ua, thiab tshwj xeeb yog vam tias koj nyiam txhua qhov kuv ua yuam kev.
Pom zoo:
Hloov-Hloov Cov Khoom Ua Si: Cov Khoom Ua Si Cov Khoom Ua Si Ua Tau Zoo!: 7 Cov Kauj Ruam (nrog Duab)
Hloov-Hloov Cov Khoom Ua Si: Cov Khoom Siv Hluav Taws Xob Ua Tau Zoo!: Qho khoom ua si hloov pauv qhib txoj hauv kev tshiab thiab kev daws teeb meem kom tso cai rau menyuam yaus uas muaj lub cev muaj peev xwm txwv lossis kev xiam oos qhab kev loj hlob los cuam tshuam nrog cov khoom ua si ntawm nws tus kheej. Hauv ntau qhov xwm txheej, cov menyuam yaus uas xav tau cov khoom ua si hloov pauv tsis tuaj yeem nkag mus
Cov Duab Duab Duab thiab Cov Duab 1: 4 Cov Kauj Ruam (nrog Duab)
Cov Duab Duab Cubes thiab Cov Duab 1: Thaum sim nrog qee cov ntoo ntoo thiab cov duab los qhia, kuv pom ob peb txoj hauv kev los ua cov voos thiab lwm yam duab los ntawm cov khoom siv yooj yim. Los ntawm kev muab cov no los ua Cov Ntawv Qhia, Kuv vam tias yuav txhawb nqa kev ua si thiab kev kawm. Kev hloov pauv ntawm qhov kev qhia no
Cov Duab Duab Duab Duab, WiFi Txuas - Raspberry Pi: 4 Cov Kauj Ruam (nrog Duab)
Cov Duab Duab Duab Duab, WiFi Txuas - Raspberry Pi: Nov yog txoj hauv kev yooj yim heev thiab tus nqi qis mus rau cov duab thav duab digital - nrog qhov zoo ntawm kev ntxiv /tshem cov duab hla WiFi ntawm 'nyem thiab luag' siv (pub dawb) xa cov ntaub ntawv . Nws tuaj yeem siv tau los ntawm qhov me me £ 4.50 Pi Zero. Koj tseem tuaj yeem hloov pauv
Cov cuab yeej cuab tam - Ceramic hauv Cov Ntsiab Lus ntawm Cov Txheej Txheem Digital thiab Analog 2015: 3 Cov Kauj Ruam (nrog Duab)
Cov cuab yeej cuab tam - Ceramic hauv Cov Ntsiab Lus ntawm Digital thiab Analog Cov Txheej Txheem 2015: Txog tam sim no, cov khoom siv hlau yog cov khoom siv tes ua uas tsis muaj kev cuam tshuam digital. Vim li no, nws zoo siab heev los ua phooj ywg nrog cov cuab yeej tshiab. Lub hauv paus pib yog daim ntawv qub thiab CNC Styrocutter.DESIGNBOOM
Rov Qab Siv Cov Duab Duab Nrog Virtual Asistent: 7 Cov Kauj Ruam (nrog Duab)
Rov Qab Siv Cov Duab Duab Nrog Virtual Asistent: Nyob zoo txhua tus! Cov lus qhia no tau yug los ntawm lub laptop faib ua ib nrab, yuav los ntawm ib tus phooj ywg. Thawj qhov kev sim ntawm txoj haujlwm no yog kuv Lego Digital Photo Frame, txawm li cas los xij, yog ib tus neeg mob siab rau Siri thiab Google Tam sim no, Kuv txiav txim siab coj nws mus rau qhov tshiab