Cov txheej txheem:

LED Teeb - Yam Yuav Tsum Tau: 6 Kauj Ruam
LED Teeb - Yam Yuav Tsum Tau: 6 Kauj Ruam

Video: LED Teeb - Yam Yuav Tsum Tau: 6 Kauj Ruam

Video: LED Teeb - Yam Yuav Tsum Tau: 6 Kauj Ruam
Video: kuv yog tus thaum koj thuam Tub huas Xyooj MV 2023 2024, Kaum ib hlis
Anonim
LED Teeb - Yam Yuav Tsum Tau
LED Teeb - Yam Yuav Tsum Tau
LED Teeb - Yam Yuav Tsum Tau
LED Teeb - Yam Yuav Tsum Tau
LED Teeb - Yam Yuav Tsum Tau
LED Teeb - Yam Yuav Tsum Tau
LED Teeb - Yam Yuav Tsum Tau
LED Teeb - Yam Yuav Tsum Tau

Txog cov lus qhia no kuv yuav qhia koj yuav ua li cas kom lub teeb ci LED qhib thiab tawm nrog kev siv Raspberry Pi, thiab qee qhov Python programming. Yam uas koj yuav xav tau rau txoj haujlwm yog raws li hauv qab no: LED teeb, Jumper coj mus, lub khob cij, USB fais fab mov (tig rau RaspberryPi), Micro SD card, thiab Raspberry Pi. Koj tseem yuav xav tau yam uas yuav tso cai rau tus neeg siv txav ib puag ncig Raspberry PI cov duab siv zoo li HDMI thiab saib xyuas kom pom dab tsi tshwm sim, thiab nas thiab keyboard kom tswj tau ib puag ncig.

Kauj Ruam 1: Teeb - Raspberry PI

Teeb - Raspberry PI
Teeb - Raspberry PI
Teeb - Raspberry PI
Teeb - Raspberry PI
Teeb - Raspberry PI
Teeb - Raspberry PI

Kuv yuav tsis mus rau qib ib qib tshwj xeeb yuav ua li cas teeb tsa Raspberry PI txij li qhov ntawd tuaj yeem yog Kev Qhia Txhua Yam ntawm nws tus kheej. Hloov chaw kuv tsuas yog muab rau koj kom khiav nrawm. koj yuav tsum tau mus rau https://www.raspberrypi.org/downlaods/noobs thiab rub tawm cov ntawv hu ua Noobs uas muaj Raspbain (lub operating system) hauv nws. Noobs yog qhov yooj yim rau teeb tsa version ntawm lub operating system uas yuav pab piav qhia qhov system rau cov neeg siv tshiab. Tom qab ntawd koj yuav rho tawm cov ntawv uas tau rub tawm thiab muab tso rau hauv daim npav Micro SD, uas tom qab ntawd yuav raug txhaj rau hauv Micro SD qhov hauv Raspberry PI. Thaum koj Qhib Raspberry PI nws yuav tom qab ntawd ua haujlwm Noobs, thiab qhia koj yuav siv lub operating system li cas.

Kauj Ruam 2: 1. Pib Pib

1. Pib Pib
1. Pib Pib
1. Pib Pib
1. Pib Pib

Koj yuav tsum tau tshem koj li Raspberry Pi (yog cov khoom siv me me ntawm ib lub tshuab computer) thiab koj lub khob cij (cov khoom siv tsawg dua rau cov qauv ib ntus nrog cov khoom siv hluav taws xob thiab kuaj cov qauv tsim tawm). Koj yuav xav tau tso ib qho ntawm koj lub teeb ci LED rau hauv ob ntawm tus pin uas nyob hauv lub khob cij. Nws tsis muaj teeb meem twg ob lub qhov koj tso koj tus pin, qhov xav tau tsuas yog koj tso tus pin rau hauv qhov uas nyob ib sab.

Kauj Ruam 3: 2. Ib txwm Siv Tus Tiv Thaiv

2. Ib txwm Siv Tus Tiv Thaiv
2. Ib txwm Siv Tus Tiv Thaiv

Qee zaum koj yuav pom tib neeg txuas lub LED ncaj qha mus rau GPIO cov chaw nres nkoj ntawm Raspberry PI, qhov no tsis zoo heev vim nws tuaj yeem ua rau cov chaw nres nkoj puas tsuaj, lossis ua rau Raspberry Pi puas tag nrho. Hauv Txoj Haujlwm no peb yuav siv 470 ohms Resistor (cov neeg tawm tsam tau siv los txo qhov ntws tam sim no), uas yuav tso cai rau LED kom pom tau yam tsis muaj kev pheej hmoo ua rau Raspberry Pi puas tsuaj. Koj xav tso ib qho ntawm tus pin resistor nyob ib sab ntawm tus pin sab saum toj ntawm LED, thiab lwm tus pin nyob rau sab saum toj ntawm kab.

Kauj Ruam 4: 3. Txuas rau Raspberry Pi

3. Txuas nrog Raspberry Pi
3. Txuas nrog Raspberry Pi
3. Txuas nrog Raspberry Pi
3. Txuas nrog Raspberry Pi
3. Txuas nrog Raspberry Pi
3. Txuas nrog Raspberry Pi
3. Txuas nrog Raspberry Pi
3. Txuas nrog Raspberry Pi

Tam sim no peb yuav txuas lub khob cij rau Raspberry PI, peb yuav ua qhov no los ntawm kev siv jumper ua. Peb yuav xav siv ob qho xim sib txawv coj los ua kom peb tsis yuam kev koj tus kheej. Nws tau qhia tias peb siv cov xim xiav thiab liab rau cov coj. Liab liab qhia txog kev sib txuas zoo, thiab xiav qhia txog kev sib txuas tsis zoo. Tom ntej no peb yuav siv cov hmoov txhuas xiav (txuas hauv av) thiab tso peb tus pin rau hauv lub qhov uas nyob ib sab ntawm tus pin hauv qab ntawm LED, Lwm sab ntawm cov hlau lead xiav yuav txuas nrog rau Raspberry PI peb tuaj yeem tso cov hmoov txhuas nyob txhua qhov chaw. hais tias nws hais hauv av (saib daim duab), peb yuav tso nws rau thib peb nqis los ntawm sab saum toj ntawm sab xis. Cov hmoov txhuas liab yuav muab tso rau ntawm kab ib yam li tus tiv thaiv (yog li kev tswj hwm tam sim no), thiab lwm sab yuav muab tso rau ntawm GPIO chaw nres nkoj 18 (rau ntawm sab saum toj ntawm sab xis)

Kauj Ruam 5: 4. Siv Python

4. Siv Python
4. Siv Python
4. Siv Python
4. Siv Python
4. Siv Python
4. Siv Python

Tam sim no peb yuav dhia hla mus rau Raspberry PI cov duab siv interface thiab qhib Python. Thawj qhov peb xav ua yog ntaus Sudo nab hab sej, qhov no yuav tso cai rau peb mus rau GPIO tus pin (tus nab nab ib txwm tsis tso cai rau peb ua qhov no). Tom ntej no peb yuav xav import Rpi. GPIO lub tsev qiv ntawv uas tso cai rau peb los cuam tshuam rau kho vajtse ntawm Raspberry pi peb yuav hloov npe Rpi. GPIO rau tsuas yog GPIO kom yooj yim ntaus ntawv. Tam sim no peb yuav tsum teeb tsa hom kom qhov kev zov me nyuam paub tias cov pins nyob qhov twg. Rau txoj haujlwm kom ua haujlwm peb tseem yuav tsum tshaj tawm tus pin yuav ua dab tsi, yog li peb yuav tshaj tawm tias tus pin 18 yuav yog qhov tso tawm. Thaum kawg peb yuav qhia txoj haujlwm kom tso tawm tam sim no ntawm tus pin 18 thiab sau qhov tseeb kom nws tso cai rau tam sim no kom dhau mus. Yog tias peb tso dag tsis yog qhov tseeb nws yuav ua rau cov coj mus tua.

Kauj Ruam 6: Qhov Kawg

Qhov kawg
Qhov kawg

Qhov kuv tau qhia koj ntawm no hauv Phau Ntawv Qhia no tsuas yog ib feem ntawm qhov koj tuaj yeem ua nrog Raspberry Pi thiab nab hab sej. Txog kev sib xyaw ntawm ob lub ntuj no yog qhov txwv, txawm tias qhov kuv tau qhia koj muaj ntau yam uas koj tuaj yeem ntxiv rau nws. Piv txwv li nws muaj peev xwm muaj qhov hloov pauv uas yuav tso cai rau LED tig rau txhua lub sijhawm uas koj nias lub pob nyem. Ntau yam tuaj yeem ua tau yog tias koj muaj sijhawm, thiab xav ua nws.

Pom zoo: