Cov txheej txheem:
- Kauj Ruam 1: Yam Koj Yuav Tsum Tau
- Kauj Ruam 2: Tsim Koj Li Circuit Court
- Kauj Ruam 3: Tsim kom muaj Python Script los nyeem Lub Teeb Ntsuas Tus Kheej
- Kauj Ruam 4: Nws Ua Haujlwm Li Cas
Video: Raspberry Pi GPIO Circuits: Siv LDR Analogue Sensor Tsis Muaj ADC (Analogue to Digital Converter): 4 Cov Kauj Ruam
2024 Tus sau: John Day | [email protected]. Kawg hloov kho: 2024-01-30 09:28
Hauv peb Cov Kev Qhia Ua Ntej Ua Ntej, peb tau qhia koj li cas koj tuaj yeem txuas koj li Raspberry Pi's GPIO pins rau LEDs thiab hloov pauv thiab GPIO pins tuaj yeem siab lossis qis. Tab sis dab tsi yog tias koj xav siv koj li Raspberry Pi nrog lub ntsuas qhov sib piv?
Yog tias peb xav siv cov ntsuas sib piv nrog Raspberry Pi, peb yuav tsum muaj peev xwm ntsuas qhov tsis kam ntawm lub ntsuas. Tsis zoo li Arduino, Raspberry Pi's GPIO pins tsis tuaj yeem ntsuas qhov tsis kam thiab tuaj yeem nkag siab tau yog tias qhov hluav taws xob muab rau lawv siab dua qee qhov hluav taws xob (kwv yees li 2 volts). Txhawm rau kov yeej qhov teeb meem no, koj tuaj yeem siv Analogue to Digital Converter (ADC), lossis koj tuaj yeem siv tus nqi hluav taws xob pheej yig dua.
Cov Lus Qhia no yuav qhia koj yuav ua li cas thiaj ua tiav qhov no.
Kauj Ruam 1: Yam Koj Yuav Tsum Tau
- RaspberryPi nrog Raspbian twb tau teeb tsa. Koj tseem yuav tsum muaj peev xwm nkag tau Pi siv Monitor, Mouse thiab Keyboard lossis los ntawm Remote Desktop. Koj tuaj yeem siv txhua tus qauv ntawm Raspberry Pi. Yog tias koj muaj ib qho ntawm Pi Zero cov qauv, koj yuav xav muab qee lub taub hau txuas rau GPIO chaw nres nkoj.
- Lub Teeb Ntsuas Tus Kheej (Kuj tseem hu ua LDR lossis Photoresistor)
- A 1 uF Ceramic Capacitor
- Ib Lub Cuab Yeej Tsis Txaus Siab Prototyping Breadboard
- Qee tus txiv neej rau poj niam jumper xov hlau
Kauj Ruam 2: Tsim Koj Li Circuit Court
Ua kom muaj cov kab lus saum toj no ntawm koj daim ntawv qhia zaub mov kom ntseeg tau tias tsis muaj ib feem ntawm cov khoom coj los kov. Lub Teeb Ntsuas Tus Kws Tiv Thaiv thiab Cov Khoom Siv Hluav Taws Xob tsis muaj qhov sib txawv uas txhais tau tias qhov tsis zoo thiab qhov zoo tam sim no tuaj yeem txuas nrog ob qho tib si. Yog li koj tsis tas yuav txhawj xeeb txog txoj kev uas cov khoom siv no tau txuas nrog hauv koj lub Circuit.
Thaum koj tau txheeb xyuas koj lub Circuit Court, txuas lub jumper cables rau koj Raspberry Pi's GPIO pins los ntawm kev ua raws daim duab saum toj no.
Kauj Ruam 3: Tsim kom muaj Python Script los nyeem Lub Teeb Ntsuas Tus Kheej
Tam sim no peb yuav sau tsab ntawv luv luv uas yuav nyeem thiab nthuav tawm qhov tsis kam ntawm LDR siv Python.
Ntawm koj tus Raspberry Pi, qhib IDLE (Ntawv Qhia> Programming> Python 2 (IDLE)). Qhib ib qhov haujlwm tshiab mus rau File> New File. Tom qab ntawv ntaus (lossis theej thiab muab tshuaj txhuam) cov cai hauv qab no:
ntshuam RPi. GPIO li GPIOimport timempin = 17 tpin = 27 GPIO.setmode (GPIO. BCM) cap = 0.000001 adj = 2.130620985i = 0 t = 0 thaum Tseeb: GPIO.setup (mpin, GPIO. OUT) GPIO.setup (tpin, GPIO. OUT) GPIO.output (mpin, False) GPIO.output (tpin, False) time.sleep (0.2) GPIO.setup (mpin, GPIO. IN) time.sleep (0.2) GPIO.output (tpin, Tseeb)) pib sijhawm = sijhawm. sijhawm () sijhawm kawg = sijhawm. sijhawm () thaum (GPIO.input (mpin) == GPIO. LOW): sijhawm kawg = sijhawm. sijhawm () ntsuas kev tiv thaiv = kawg sijhawm-pib lub sijhawm res = (ntsuas kev tiv thaiv/cap)* adj kuv = kuv+1 t = t+res yog kuv == 10: t = t/kuv luam tawm (t) kuv = 0 t = 0
Txuag koj txoj haujlwm li lightsensor.py (Cov Ntaub Ntawv> Txuag Raws Li) hauv koj cov ntawv tais ceev tseg.
Tam sim no qhib Terminal (Ntawv Qhia> Accessories> Terminal) thiab ntaus cov lus txib hauv qab no:
nab hab sej lightsensor.py
Raspberry Pi yuav rov ua kom pom qhov tsis kam ntawm photoresistor. Yog tias koj tso koj tus ntiv tes hla tus photoresistor, qhov kev tiv thaiv yuav nce ntxiv. Yog tias koj ua lub teeb ci ntsa iab ntawm lub photoresistor, qhov ua haujlwm yuav txo qis. Koj tuaj yeem nres qhov haujlwm no los ntawm kev nias CTRL+Z.
Kauj Ruam 4: Nws Ua Haujlwm Li Cas
Raws li tus capacitor maj mam tsub nqi, qhov hluav taws xob uas dhau los ntawm Circuit Court thiab mus rau GPIO tus pin nce. Thaum lub capacitor raug them rau qee qhov taw tes, nws qhov hluav taws xob nce siab dua 2 volts thiab Raspberry Pi yuav nkag siab tias GPIO tus pin 13 yog HIGH.
Yog tias qhov tsis kam ntawm lub ntsuas hluav taws xob nce ntxiv, lub tshuab hluav taws xob yuav them qeeb dua thiab lub Circuit Court yuav siv sijhawm ntau dua los mus txog 2 volts.
Cov ntawv sau saum toj no tseem ceeb npaum li cas nws yuav siv sij hawm ntev rau tus pin 13 kom tig siab thiab tom qab ntawd siv qhov ntsuas no los xam qhov tsis kam ntawm Photoresistor.
Pom zoo:
Ua kom yooj yim Infinity Daim iav Cube - TSIS MUAJ 3D Luam Ntawv thiab Tsis Muaj Kev Sau Npe: 15 Kauj Ruam (nrog Duab)
Ua kom yooj yim Infinity Daim iav Cube | TSIS MUAJ 3D Luam Ntawv thiab Tsis Muaj Kev Sau Npe: Txhua leej txhua tus nyiam lub voos xwmfab zoo, tab sis lawv zoo li lawv yuav nyuaj ua. Kuv lub hom phiaj rau Cov Lus Qhia no yog qhia koj ib qib zuj zus tias yuav ua li cas. Tsis tsuas yog qhov ntawd, tab sis nrog cov lus qhia uas kuv tau muab rau koj, koj yuav muaj peev xwm ua ib qho
Ua Koj Tus Kheej Pob Zeb Band Ekit Adaptor (tsis muaj Adapter), Tsis Muaj Kev Puas Tsuaj!: 10 Kauj Ruam
Ua Koj Tus Kheej Pob Zeb Band Ekit Adaptor (tsis muaj Legacy Adapter), Tsis Muaj Kev Puas Tsuaj!: Tom qab hnov lub suab nrov podcast tus tswv tsev hais txog nws qhov kev txhawj xeeb txog nws lub xov tooj cua USB txuas txuas qub txeeg qub teg tuag, Kuv tau mus nrhiav DIY kev daws teeb meem kom zoo dua/kev cai eKit rau RB . Ua tsaug rau Mr DONINATOR hauv Youtube uas tau tsim cov vis dis aus qhia txog nws qhov zoo sib xws
Tuchless Hloov rau Cov Khoom Siv Hauv Tsev -- Tswj Koj Cov Khoom Siv Hauv Tsev Tsis Muaj Tuch Ib qho Hloov: 4 Cov Kauj Ruam
Tuchless Hloov rau Cov Khoom Siv Hauv Tsev || Tswj Koj Cov Khoom Siv Hauv Tsev Tsis Muaj Tuch Ib qho Hloov: Nov Yog Qhov Tuchless Hloov Rau Cov Khoom Siv Hauv Tsev. Koj Siv Tau Qhov No Mus Rau Txhua Qhov Chaw Hauv Pej Xeem Kom Pab Tau Tawm Tsam Ib Yam Kab Mob. Lub Circuit Court Raws Li Tsaus Sensor Circuit Ua Los Ntawm Op-Amp Thiab LDR. Qhov Tseem Ceeb Thib Ob Ntawm Qhov Circuit Court SR Flip-Flop Nrog Sequencell
Khiav Tsis Muaj Lub Vijtsam / Zaub (tsis muaj taub hau) ntawm Raspberry Pi lossis Lwm Lub Linux / unix Raws Li Tshuab Luam Ntawv: 6 Cov Kauj Ruam
Khiav Tsis Muaj Lub Vijtsam / Zaub (tsis muaj lub taub hau) ntawm Raspberry Pi lossis Lwm Lub Linux / unix Raws Li Lub Khoos Phis Tawj: Thaum neeg feem coob yuav Raspberry PI, lawv xav tias lawv xav tau lub computer screen. Tsis txhob nkim koj cov nyiaj ntawm lub computer saib tsis tseem ceeb thiab cov twj siv hluav taws xob. Tsis txhob nkim koj lub sijhawm txav cov keyboard thiab saib ntawm cov khoos phis tawj. Tsis txhob khi TV thaum nws tsis yog
Zero Tus Nqi Laptop Txias / Sawv (Tsis Kua, Tsis Muaj Drilling, Tsis Ceev & Bolts, Tsis Ntsia Hlau): 3 Kauj Ruam
Zero Tus Nqi Laptop Txias / Sawv (Tsis Muaj Cov Kua, Tsis Muaj Drilling, Tsis Ceev & Bolts, Tsis Muaj Screws): Hloov kho tshiab: THOV TSHIAB KINDLY VOTE Rau MY INSTRUCTABLE, Ua tsaug ^ _ ^ Koj kuj tseem tuaj yeem sau npe rau kuv qhov kev xav NYEEM NTAWV www.instructables.com/id/Zero-Cost-Aluminium-Furnace-No-Propane-No-Glue-/ LOS YOG MAYBE VOTE rau kuv tus phooj ywg zoo tshaj plaws