Cov txheej txheem:

Siv Cov Duab Tseem Nrog Raspberry Pi: 9 Kauj Ruam
Siv Cov Duab Tseem Nrog Raspberry Pi: 9 Kauj Ruam

Video: Siv Cov Duab Tseem Nrog Raspberry Pi: 9 Kauj Ruam

Video: Siv Cov Duab Tseem Nrog Raspberry Pi: 9 Kauj Ruam
Video: Saib Mis paub Poj niam (hluas nkauj) tus yam ntxwv lub siab 2024, Kaum ib hlis
Anonim
Image
Image

Yuav ua li cas thiaj thaij tau duab nrog Raspberry Pi

Kauj Ruam 1: Tau Txais Cov Ntaub Ntawv

Teeb tsa Raspberry Pi
Teeb tsa Raspberry Pi

Koj yuav xav tau:

  • Lub koob yees duab nrog cov hlua txuas txuas rau Raspberry Pi Raspberry Pi (saib duab)
  • HDMI qaum los ntsaws
  • 5 volt 2 amp hwj chim charger
  • Mouse thiab keyboard

Kauj Ruam 2: Teeb Raspberry Pi

  1. Xaiv lub hwj huam qaum
  2. Plug rau hauv qhov hluav taws xob hauv phab ntsa Siv lwm qhov kawg los ntsaws rau hauv Raspberry Pi qhov hluav taws xob (saib duab)
  3. Xaiv lub HDMI cable
  4. Txuas ib qho kawg rau tus saib xyuas hauv chav kawm
  5. Txuas lwm qhov kawg rau hauv Raspberry Pi HDMI chaw nres nkoj (saib duab)
  6. Mus nqa nas thiab keyboard wireless USB plugin

    1. Xyuas kom tseeb tias "Dell" sau rau ntawm lub USB plug -in tab tom ntsib (saib duab)
    2. Plug hauv USB txuas rau USB chaw nres nkoj ntawm Raspberry Pi (saib duab)

Kauj Ruam 3: Txuas Lub Koob Yees Duab

Txuas Lub Koob Yees Duab
Txuas Lub Koob Yees Duab
Txuas Lub Koob Yees Duab
Txuas Lub Koob Yees Duab
  1. Nrhiav lub koob yees duab chaw nres nkoj tab ntawm Raspberry Pi
  2. Rub lub koob yees duab chaw nres nkoj tab dub ntawm Raspberry Pi

    Cov tab yuav nyob rau sab laug thiab sab xis ntawm lub koob yees duab chaw nres nkoj (Saib duab 1)

  3. Siv lub koob yees duab ribbon txuas los ntsaws rau hauv lub koob yees duab chaw nres nkoj

    1. Ua kom ntseeg tau cov xim hlau ntawm daim kab xev lub ntsej muag HDMI chaw nres nkoj ntawm Raspberry Pi (Saib duab 2)
    2. Plug hauv kab xov txuas rau hauv qhov chaw nres nkoj
    3. Ua kom ntseeg tau tias cov hlua hlau tau thawb txhua txoj kev nqes mus rau hauv qhov chaw nres nkoj
    4. Thawb nqes tab ntawm lub koob yees duab chaw nres nkoj kom ruaj ntseg kab hlua

      Yuav muaj qhov me me "nyem" thaum tab chaw nres nkoj raug thawb

Kauj ruam 4: Tig rau Raspberry Pi

  1. Nrhiav lub hwj huam qaum
  2. Nrhiav rau/tawm khawm ntawm qaum
  3. Nias lub pob kom qhib
  4. Cia qhov system thauj kom txog thaum lub ncuav qab zib raspberry tshwm

Kauj ruam 5: Pab kom lub Koob Yees Duab

Pab kom lub Koob Yees Duab
Pab kom lub Koob Yees Duab
  1. Nyem Raspberry Pi lub tsev khawm. (Saib duab)
  2. Hover hla Preferences Tab
  3. Nyem Raspberry Pi Configurations Tab
  4. Nyem Interfaces Tab ntawm cov ntawv qhia zaub mov tshiab
  5. Nyem pab ua npuas rau thawj lub koob yees duab xaiv
  6. Nyem qhov 'ua li cas' xaiv
  7. Nyem 'Yog' thaum nug kom rov pib dua

Kauj Ruam 6: Qhib Kev Sau Ntawv Thov 'Thonny Python IDE'

Qhib Cov Ntawv Thov Kev Pabcuam 'Thonny Python IDE'
Qhib Cov Ntawv Thov Kev Pabcuam 'Thonny Python IDE'
  1. Nyem Raspberry Pi lub tsev khawm

    Cov ntawv qhia zaub mov nco tseg yuav tshwm (Saib duab)

  2. Hover hla Programming tab

    Lwm cov ntawv qhia zaub mov nco tseg yuav tshwm (Saib duab)

  3. Xaiv Thonny Python IDE los ntawm cov npe (Saib duab)

    Yuav qhib daim ntawv thov kev pab

Kauj ruam 7: Ntaus Code

Ntaus Txoj Cai
Ntaus Txoj Cai
  1. Txoj cai yuav tsum tau ntaus yam zoo li sau ntawv
  2. Nyem hauv kab ntawv dawb (Saib duab rau cov lus qhia hauv qab no)
  3. Ntaus thawj kab "los ntawm picamera ntshuam PiCamera"

    Ntaus Enter rau kab tshiab

  4. Ntawm kab kab tom ntej "los ntawm lub sijhawm ntshuam pw"

    Ntaus Enter dua

  5. Hom kab tom ntej "lub koob yees duab = PiCamera ()"

    Ntaus Enter dua rau kab tshiab

  6. Hom kab tom ntej "camera.rotation = 180"

    Ntaus Enter dua rau kab tshiab

  7. Hom kab tom ntej “sim:”

    Ntaus Ntaus dua Kab yuav cia li TAB

  8. Tom qab ntawv ntaus “camera.start_preview ()”

    Ntaus Enter dua

  9. Hom kab tom ntej “pw tsaug zog (5)”

    Ntaus Enter dua

  10. Hom kab tom ntej "camera.capture ('/home/pi/Desktop/cameraTestImage.jpg')"

    Ntaus Enter dua

  11. Hom kab tom ntej “pw tsaug zog (2)”

    1. Ntaus Enter dua
    2. Nias lub Backspace khawm ntawm koj cov keyboard kom tshem tawm qhov tsis siv neeg no tab.
  12. Hom kab tom ntej "thaum kawg:"

    Ntaus Enter dua

  13. Hom kab tom ntej “camera.stop_preview ()”

    Ntaus Enter dua

  14. Hom kab tom ntej “camera.close ()”
  15. Nyem Cov Ntaub Ntawv nyob rau sab saud sab laug ntawm daim ntawv thov

    Qhov no yuav qhib cov ntawv qhia zaub mov nco

  16. Nyem Txuag Raws li … los ntawm cov ntawv qhia zaub mov

    Qhov no yuav qhib cov ntawv qhia zaub mov

  17. Npe koj qhov program “cameraTest” hauv kab ntawv cim “cim npe:”
  18. Nias lub khawm Txuag.

Kauj Ruam 8: Siv Daim Duab

Noj Daim Duab
Noj Daim Duab
  1. Nyem rau Green Arrow khawm hauv daim ntawv thov kom ua haujlwm thiab thaij duab! (Saib duab)
  2. Yog tias koj tau ua yuam kev thaum thaij duab, thawj zaug tshuaj xyuas ob zaug tias koj cov cai yog raws nraim hauv daim duab.

    Yog tias tsis yog, xyuas kom tseeb tias nws zoo ib yam

  3. Yog tias koj tseem muaj qhov ua yuam kev tom qab kuaj ob zaug koj tus lej zoo ib yam, xyuas kom meej tias koj ua tiav qib 5 kom pab tau lub koob yees duab.

Kauj Ruam 9: Yuav Qhib Duab Li Cas

  1. Cov ntaub ntawv yuav tshwm ntawm lub vijtsam tsev mus rau sab laug ntawm qhib qhov program Thonny yog tias koj khaws nws rau lub desktop
  2. Cov ntaub ntawv yuav raug hu ua "cameraTest"
  3. Ob npaug nias cov ntaub ntawv qhib

Pom zoo: