Cov txheej txheem:

Kab tshoob / Kev tshwm sim Photobooth: 6 Kauj Ruam (nrog Duab)
Kab tshoob / Kev tshwm sim Photobooth: 6 Kauj Ruam (nrog Duab)

Video: Kab tshoob / Kev tshwm sim Photobooth: 6 Kauj Ruam (nrog Duab)

Video: Kab tshoob / Kev tshwm sim Photobooth: 6 Kauj Ruam (nrog Duab)
Video: Qhia txog tshwm sim hmoob lub kaus & kev ua tshoob By Xib Hwb Soob Ntxawg Thoj 2024, Kaum ib hlis
Anonim
Kab tshoob / Kev tshwm sim Photobooth
Kab tshoob / Kev tshwm sim Photobooth
Kab tshoob / Kev tshwm sim Photobooth
Kab tshoob / Kev tshwm sim Photobooth
Kab tshoob / Kev tshwm sim Photobooth
Kab tshoob / Kev tshwm sim Photobooth

Nyob zoo txhua tus, Kuv tau sib yuav xyoo tas los, thaum peb tab tom nrhiav kev npaj D-hnub, peb tau mus ntau qhov kev ua tshoob.

Ntawm txhua qhov kev sib tham muaj Photobooth tus neeg xauj tsev, Kuv xav tias photobooth yog qhov zoo tshaj plaws rau kev ua tshoob, txhua tus qhua tuaj yeem lom zem nrog nws thiab tuaj yeem tawm ntawm lub tshoob nrog kev nco txog tog.

Kuv tau hais rau kuv tus poj niam yav tom ntej: "Kuv yuav luag txhua yam uas kuv xav tau los ua duab nyob hauv tsev, kuv yuav ua qhov ntawd!".

Yog li ntawm no koj yuav pom yuav ua li cas thiaj ua Photobooth rau koj kab tshoob lossis lwm yam kev tshwm sim.

Txij li thaum tshoob peb qiv nws rau cov phooj ywg rau ntau yam xwm txheej (hnub yug, ua kev cai raus dej…), lom zem heev.

Kauj Ruam 1: Txhua Yam Koj Xav Tau

Txhua Yam Koj Xav Tau
Txhua Yam Koj Xav Tau
Txhua Yam Koj Xav Tau
Txhua Yam Koj Xav Tau
Txhua Yam Koj Xav Tau
Txhua Yam Koj Xav Tau

Nov yog cov npe ntawm txhua yam kuv yuav tsum tau ua kuv Photobooth:

  • 1 Raspberry pi (rau kuv Raspberry 1 tus qauv B vim kuv tau txais nws ua ntej tab sis koj tuaj yeem siv tus tshiab dua)
  • 1 SD Card rau raspberry
  • 1 micro USB cable + lub zog hloov pauv 5V thiab 2A (rau lub zog raspberry)
  • 1 Lub koob yees duab module rau raspberry
  • 1 USB Hub powered
  • 1 lub tshuab luam ntawv yees duab tau tshaj nrog raspbian (rau kuv HP Photosmart 475)
  • 1 loj arcade khawm 100mm nrog coj
  • 1 12v hloov pauv rau khawm coj
  • 1 PC screen (yog tias nws tsis yog HDMI screen koj yuav xav tau HDMI adapter txuas rau Raspberry)
  • 3 tsom teeb nrog transformer
  • 1 lub rooj grommet ntawm 80mm los kho lub koob yees duab module
  • Cov ntoo los ua lub thawv
  • Txhua qhov kev kho kom zoo nkauj koj xav kom dai koj lub Photobooth (rau kuv daim duab liab qab).

Kauj Ruam 2: Npaj Koj Raspberry Pi

Npaj Koj Raspberry Pi
Npaj Koj Raspberry Pi
Npaj Koj Raspberry Pi
Npaj Koj Raspberry Pi

Ua ntej tshaj plaws koj yuav tsum npaj koj li Raspberry pi thiab sim txhua qhov koj teeb tsa nrog qhov program (Kuv yuav muab koj li kev pab cuam rau koj tsis txhob txhawj;)).

1. Load OS ntawm Raspberry pi rau hauv SD card => Raspbian (Linux OS rau Raspberry)

Los ntawm koj lub khoos phis tawj (windows / mac / linux):

  • Rub tawm Raspbian nrog lub desktop los ntawm nplooj ntawv no:
  • Rub tawm Etcher thiab teeb tsa nws los ntawm nplooj ntawv no:
  • Txuas tus nyeem daim npav SD nrog daim npav SD sab hauv.
  • Qhib Etcher thiab xaiv los ntawm koj lub hard drive Raspberry Pi.img lossis.zip cov ntaub ntawv koj xav sau rau SD daim npav.
  • Xaiv daim npav SD koj xav sau koj daim duab rau.

Txheeb xyuas koj cov kev xaiv thiab nyem 'Flash!' pib sau cov ntaub ntawv rau SD daim npav

Koj tuaj yeem nrhiav cov ntaub ntawv ntxiv ntawm nplooj ntawv no:

2. Pab kom lub koob yees duab module

Kom pab tau lub koob yees duab module muaj kev teeb tsa me me los ua:

3. Npaj Raspbian nrog txhua lub tsev qiv ntawv koj xav tau

Nruab Python (vim tias program tau tsim nrog Python), koj yuav pom yuav ua li cas ua ntawm no:

  • Nruab Pygame (tsev qiv ntawv rau python graphical interface), xav paub ntau ntxiv ntawm no:
  • Nruab Picamera (lub tsev qiv ntawv rau lub koob yees duab ntawm Raspberry pi):
  • Nruab Python module RPI. GPIO (tsev qiv ntawv rau kev tswj Raspberry GPIO rau khawm khawm): https://learn.adafruit.com/playing-sounds-and-using-buttons-with-raspberry-pi/install-python-module- rpi-dot-gpio
  • Nruab CUPS ntxiv lub tshuab luam ntawv ntawm Raspbian, koj yuav pom yuav ua li cas ntawm no: https://www.howtogeek.com/169679/how-to-add-a-printer-to-your-raspberry-pi-or-other -luxux-computer/
  • Nruab PIL (tsev qiv ntawv rau cov duab ntawm Python):

Kauj Ruam 3: Hlau Arcade Khawm ntawm Raspberry Pi

Hlau Arcade Khawm ntawm Raspberry Pi
Hlau Arcade Khawm ntawm Raspberry Pi

Ntawm kuv qhov haujlwm, Kuv teeb lub pob ntawm GPIO Pin 25 ntawm raspberry pi 1 tus qauv B.

Kauj ruam 4: Ntshuam Program Los Ntawm Github

Ntshuam Program Los Ntawm Github
Ntshuam Program Los Ntawm Github

Koj yuav pom qhov haujlwm ntawm Github:

Cov cai nyob hauv camera.py cov ntaub ntawv, koj yuav xav tau cov duab nplaub tshev rau lub ntsiab lus tseem ceeb ntawm lub photobooth.

Ntawm tus lej koj tuaj yeem hloov txoj hauv kev ntawm daim nplaub tshev uas cov duab yuav raug cawm.

Txhawm rau khiav nws koj tsuas yog yuav tsum qhib lub davhlau ya nyob twg, mus rau lub program nplaub tshev thiab ntaus "sudo python camera.py"

Yog tias koj xav sim nws yam tsis muaj khawm khawm ntawm GPIO Pin 25 ntawm raspberry, koj tuaj yeem thawb nqes xub ntawm koj cov keyboard.

Thaum kawg, Kuv xav ua qhov haujlwm thaum pib ntawm raspberry pi yog li kuv ua raws qhov kev qhia no

Tsab ntawv uas pib thaum pib yog nyob ntawm Github: photobooth-script.sh

Kauj Ruam 5: Ua Lub Thawv

Ua lub thawv
Ua lub thawv
Ua lub thawv
Ua lub thawv
Ua lub thawv
Ua lub thawv
Ua lub thawv
Ua lub thawv

Koj yuav pom ntawm no txhua qib ntawm kev tsim kho lub thawv

Pom zoo: