Cov txheej txheem:
Video: Lub Zeem Muag Sensor Lub Koob Yees Duab: 4 Kauj Ruam
2024 Tus sau: John Day | [email protected]. Kawg hloov kho: 2024-01-30 09:29
Cov lus qhia no yuav qhia koj yuav ua li cas thiaj Ua Lub Zeem Muag Sensor Lub Koob Yees Duab siv lub raspberry pi. Txoj haujlwm no yuav siv raspberry pi thiab siv nab hab sej 3 rau kev sau npe hauv qhov haujlwm no Lub Zeem Muag Sensor Lub Koob Yees Duab yuav xub ntsuas tawm 100 cm tom qab ntawd yuav ntsais RGB LED thiab yuav thaij duab. Tom qab ntawd los qhia tias daim duab tau yees duab lawm RGB LED yuav yog xim xiav xim. Tom qab ntawd txhawm rau nkag mus rau daim duab koj mus rau lub rooj saum toj kawg nkaus ntawm raspberry pi uas daim duab tau yees duab.
Koj yuav xav tau:
- 1 x Raspberry Pi
- 1 x T-Cobbler
- 1x Tag Nrho Qhov Loj Breadboard
- 1x Pi Lub Koob Yees Duab
- 1 x RGB LED (Cathode)
- 1 X nrug Sensor
- 1 x 330 Ω Resistor
- 1 x 560 Ω Resistor
- Xiav Hlau
- Cov xov dub
- Liab Hlau
Kauj ruam 1:
Tau txais cov ntu thiab txuas T-Cobbler mus rau Raspberry Pi thiab cov ntawv ci. Tom ntej teeb tsa hauv av thiab cov xov hluav taws xob. Los ntawm 5.0 v txiav thiab sawb txaus ntawm cov hlau liab kom haum rau hauv lub qhov tom ntej 5.0 v ntawm T-Cobbler thiab muab tso rau sab zoo ntawm qhov zoo thiab qhov tsis zoo ntawm lub rooj tsavxwm ntawm ib sab. Tom qab ntawd ua qhov koj nyuam qhuav tau ua tab sis nrog xaim dub nkag rau hauv GND thiab qhov ntawd nkag mus rau qhov tsis zoo. Tom qab ntawd mus rau lwm sab ntawm lub khob cij thiab txuas ob sab zoo ua ke thiab ob sab tsis zoo ua ke nrog xaim kom qhov zoo yog liab thiab tsis zoo yog dub. Raws li qhia hauv kab lus no
Kauj ruam 2:
Siv lub ntsuas nrug, RGB LED, thiab lub koob yees duab pi thiab muab tso rau hauv qhov chaw ntawm tus pi thiab daim txiag ntoo. Txuas lub koob yees duab pi mus rau raspberry pi hauv qhov chaw qhia. Tom qab ntawd muab RGB LED tso rau hauv lub khob cij thiab xyuas kom tseeb tias txhua qhov ua tau zoo nkag mus rau hauv lub qhov uas koj muab tso rau hauv. Nyeem txog dab tsi RGB LED koj muaj thiab ceeb toom tias cov hlau lead yog dab tsi. Tom qab ntawd nrhiav qhov chaw rau qhov ntsuas qhov deb ntawm lub khob cij uas tsis muaj dab tsi nyob hauv txoj kev. Daim ntawv ceeb toom tias cov hlau lead mus qhov twg raws li koj yuav tsum paub rau qib tom ntej.
Kauj ruam 3:
Tam sim no ua kom tiav cov xov hluav taws xob hauv Circuit Court thiab nrhiav cov resistors raug rau txoj haujlwm raug. Yog li los sawv cev rau lub zog Kuv tau siv xov tooj liab, rau hauv av Kuv siv cov xov hlau dub, thiab rau GPIO cov xov hlau Kuv tau siv cov xov hlau xiav. Thiab hauv cov kauj ruam no peb tseem yuav muab cov resistors tso rau hauv qhov chaw raug los ntawm qhov deb sensor. Yog tias xav tau ua raws cov txheej txheem yuav ua li cas xaim kab hluav taws xob no.
Kauj ruam 4:
Tam sim no rau cov kauj ruam no peb yuav tau coding thiab rau qhov no peb yuav siv nab hab sej 3. dab tsi yuav tsum tshwm sim yog tias yog qhov nrug nruab nrab ntawm koj thiab lub ntsuas nrug deb tshaj 100 cm ces lub koob yees duab yuav yees duab. Tab sis tsuas yog ua ntej daim duab nws yuav nyem liab thiab tom qab yees duab nws yuav yog xim tawv tawv.
Nab hab sej 3 code
ntshuam RPi. GPIO li GPIO los ntawm picamera ntshuam PiCamera los ntawm lub sijhawm ntshuam pw, sijhawm los ntawm gpiozero ntshuam LED, Khawm
lub koob yees duab = PiCamera ()
GPIO.setmode (GPIO. BCM)
GPIO_TRIGGER = 13GPIO_ECHO = 19 liab = LED (16) ntsuab = LED (20) xiav = LED (21) dua = Tseeb
GPIO.setwarnings (Cuav) GPIO.setup (GPIO_TRIGGER, GPIO. OUT) GPIO.setup (GPIO_ECHO, GPIO. IN)
def RedLight (): red.blink () ntsuab.on () xiav.on ()
def BlueLight (): red.on () ntsuab.on () blue.off ()
def GreenLight (): red.on () ntsuab.off () blue.on ()
def nrug (): GPIO.output (GPIO_TRIGGER, Tseeb)
pw tsaug zog (0.00001) GPIO.output (GPIO_TRIGGER, Tsis tseeb)
StartTime = sijhawm () StopTime = sijhawm ()
thaum GPIO.input (GPIO_ECHO) == 0: PibTime = sijhawm ()
thaum GPIO.input (GPIO_ECHO) == 1: StopTime = sijhawm ()
TimeElapsed = StopTime - StartTime nrug = (TimeElapsed * 34300) / 2
rov nrug deb
sim: thaum ntxiv: deb = nrug () yog tias nrug> 100: camera.start_preview () RedLight () RedLight () pw (5) camera.capture ('/home/pi/Desktop/Image.jpg') camera.stop_preview () BlueLight () dua = Sau tsis raug ("Ntsuas Kev Ntsuas = %.1f cm" % deb) pw tsaug zog (1)
# Rov pib dua los ntawm nias CTRL + Cexcept KeyboardInterrupt: luam tawm ("Kev ntsuas ntsuas nres los ntawm Tus Neeg Siv") GPIO.cleanup ()
Pom zoo:
$ 5 Lub Koob Yees Duab Lub Koob Yees Duab rau Lub Rooj Sib Tham Video: 4 Cov Kauj Ruam (nrog Duab)
$ 5 Laptop Document Camera for Conferencing Video: Luam tawm 20200811 los ntawm John E. Nelson [email protected] tsis ntev los no tau tshaj tawm qhia qhia kev siv lub khoos phis tawj khoos phis tawj khoos phis tawj ua lub koob yees duab rau kev sib tham video. www.instructables.com/id/A-Sub-10-MetaPrax-Documen
Lub Koob Yees Duab CCTV Nrog NodeMCU + Lub Laus Laptop Lub Koob Yees Duab (Nrog thiab Tsis Siv Blynk): 5 Kauj Ruam
CCTV Lub Koob Yees Duab Nrog NodeMCU + Lub Laus Laptop Lub Koob Yees Duab (Nrog thiab Tsis Siv Blynk): Nyob zoo cov phooj ywg! Hauv cov lus qhia no, Kuv yuav qhia koj li cas kuv siv lub khoos phis tawj qub lub koob yees duab thiab nodeMCU los ua qee yam zoo ib yam li CCTV
Lub taub hau Nrhiav Nrog Wii Lub Koob Yees Duab Lub Koob Yees Duab (Tsov Rog Thunder): 6 Cov Kauj Ruam (nrog Duab)
Txheeb Xyuas Lub Taub Hau Nrog Wii Lub Koob Yees Duab Lub Koob Yees Duab (Tsov Rog Thunder): Nyob zoo txhua tus! Kuv xav qhia rau koj nrog kuv thawj qhov haujlwm tiav Arduino tiav. Kuv tau sim ua ib hom kev ua hauv tsev ntxiv rau kev muaj tiag. Cia kuv piav qhia nws rau koj: Nws yog qhov txheej txheem uas siv lub koob yees duab txhawm rau taug qab koj lub taub hau txav los hloov nws raws li
Lub Koob Yees Duab Stabilizer rau ENV2 lossis Lwm Lub Xov Tooj Lub Koob Yees Duab: 6 Kauj Ruam
Lub Koob Yees Duab Stabilizer rau ENV2 lossis Lwm Lub Xov Tooj Lub Koob Yees Duab: Puas xav ua video tab sis koj tsuas muaj lub xov tooj lub koob yees duab? Koj puas tau ua yeeb yaj kiab nrog lub koob yees duab lub xov tooj tab sis koj tseem tuav tsis tau nws? Zoo tshaj qhov no yog cov lus qhia rau koj
Hmo Hmo Pom Lub Zeem Muag Digital Lub Koob Yees Duab/lub koob yees duab: 17 Cov Kauj Ruam (nrog Duab)
Infrared Hmo Hmo Pom Lub Koob Yees Duab/Lub Koob Yees Duab: Cov lus qhia no piav qhia yuav hloov pauv li cas Kev Pom Kev Pom Kev Pom Hmo Hmo Hmo Hmo Hmo Hmo Hmo Hmo Hmo Tsis Pom Kev (uas yog tshaj tawm tsis raug los siv "" lub ntsej muag pom kev hmo ntuj tiag tiag thev naus laus zis ") mus rau qhov tseeb pom pom hmo ntuj pom lub koob yees duab. Qhov no zoo ib yam li IR webca