Cov txheej txheem:

Raspberry Pi Tsev Saib Xyuas Nrog Dropbox: 7 Cov Kauj Ruam
Raspberry Pi Tsev Saib Xyuas Nrog Dropbox: 7 Cov Kauj Ruam

Video: Raspberry Pi Tsev Saib Xyuas Nrog Dropbox: 7 Cov Kauj Ruam

Video: Raspberry Pi Tsev Saib Xyuas Nrog Dropbox: 7 Cov Kauj Ruam
Video: Saib Mis paub Poj niam (hluas nkauj) tus yam ntxwv lub siab 2024, Hlis ntuj nqeg
Anonim
Raspberry Pi Tsev Saib Xyuas Nrog Dropbox
Raspberry Pi Tsev Saib Xyuas Nrog Dropbox

Phau ntawv qhia no yuav qhia koj yuav ua li cas tsim kom yooj yim thiab nthuav dav kev tshuaj xyuas lub tsev siv Raspberry Pi, lub vev xaib, ob peb yam khoom siv hluav taws xob thiab koj li Dropbox account. Cov txheej txheem ua tiav yuav tso cai rau koj thov nyob deb thiab saib cov duab los ntawm koj lub vev xaib thaum tseem siv lub ntsuas ntsuas kub tawm ntawm lub txee los saib xyuas qhov ntsuas kub ntawm koj lub tsev hauv is taws nem, txhua yam siv Dropbox.

Nov yog thawj qhov haujlwm kuv xav txog tom qab tau txais Raspberry Pi 2 tus qauv B. Kuv lub hom phiaj yog tsim kom muaj Python-based xyuas qhov system uas kuv tuaj yeem tswj hwm thiab tau txais cov ntaub ntawv los ntawm is taws nem. Thaum muaj ntau txoj hauv kev los ua qhov no, Kuv txiav txim siab siv Dropbox ua qhov sib cuam tshuam ntawm Pi thiab internet vim lawv muaj Python API yooj yim uas tso cai rau koj rub tawm, hloov kho thiab tshawb nrhiav cov ntaub ntawv hauv cov ntawv tshwj xeeb uas siv ob peb kab ntawm chaws.

Kuv kuj xav kom kuv cov kev daws teeb meem hnyav thiab yooj yim, thiab kom tsis txhob cuam tshuam kuv Pi nrog cov tsev qiv ntawv thiab cov haujlwm tsis tsim nyog. Qhov software tivthaiv ntawm txoj haujlwm no suav nrog ib tsab ntawv Python, txhais tau tias koj tuaj yeem siv koj li Pi txuas ntxiv mus ib txwm, txawm tias thaum lub kaw lus saib xyuas tau ua haujlwm.

Rau qhov haujlwm no koj yuav xav tau:

Ib Raspberry Pi. Txhua tus qauv yuav tsum ua haujlwm, Kuv tau siv tag nrho-hauv-ib qhov khoom siv pib, tab sis tej zaum koj xav tau lub hauv paus nkaus xwb

USB lub webcam. Kuv yuav qhov pheej yig ADVENT AWC72015, uas tau tshwm sim los ua haujlwm zoo. Nws yuav yog lub tswv yim zoo los tham nrog cov npe ntawm webcams uas tau lees paub ua haujlwm nrog Pi. Nco ntsoov tias qee qhov xav tau lub zog USB txuas (kuv ua haujlwm tau zoo yam tsis muaj)

Ib tus lej Dropbox. Kuv siv kuv tus lej pub dawb raws li txoj haujlwm no tsis xav tau chaw sau ntau

DS18B20 digital ntsuas kub thiab 4.7k resistor. Koj tuaj yeem yuav lub ntsuas cua ntawm no, thiab nws yuav tsim nyog tau txais pob ntawm ntau yam tiv thaiv ib yam nkaus

Qee cov khoom siv hluav taws xob tsim hluav taws xob. Kuv xav kom siv lub khob cij thiab qee cov hlua txuas txuas kom ua cov txheej txheem tsim hluav taws xob kom yooj yim li sai tau

[Yog tias koj txiav txim siab yuav ib yam ntawm cov khoom no, Kuv yuav zoo siab heev yog tias koj nkag mus rau cov npe siv cov kab ntawv saum toj no - txoj kev ntawd, Kuv tau txais cov nyiaj me me ntawm cov txiaj ntsig yam tsis tau them nqi ntxiv rau koj!]

Kauj ruam 1: Teeb Kho Vajtse

Teeb Kho Vajtse
Teeb Kho Vajtse

Thawj kauj ruam yog kom ntseeg tau tias koj Pi thiab cov khoom siv sib txuam tau teeb tsa.

Ua ntej, txuas koj Pi rau hauv internet. Qhov no yog qhov tsim nyog kom ntseeg tau tias qhov kev tshuaj xyuas tuaj yeem tau txais koj li kev thov thiab xa cov ntaub ntawv mus rau Dropbox. Kuv siv kev sib txuas ethernet kom ntseeg tau tias muaj kev ntseeg tau, tab sis Wi-nkaus kev sib txuas yuav tsum ua haujlwm zoo ib yam, thaum tseem muaj qhov zoo ntawm kev txhim kho nqa tau. Yog tias koj xaiv Wi-nkaus, Kuv xav qhia qhov USB dongle rau Pi.

Tom ntej no, txuas koj lub vev xaib mus rau Pi los ntawm ntsaws nws rau hauv ib qho ntawm USB chaw nres nkoj. Thaum kuv Advent webcam cov lus qhia tsis tau hais meej tias nws yuav ua haujlwm nrog Linux, txhua yam kuv yuav tsum tau ua yog ntsaws nws thiab khau raj Pi. Tsis xav tau kev teeb tsa ntxiv. Lwm lub webcams yuav txawv. Koj tuaj yeem tshawb xyuas seb koj lub vev xaib tau pom los ntawm Linux siv cov lus txib hauv qab no:

lsusb

Hauv cov duab saum toj no, kuv lub vev xaib tau teev tseg ua '0c45: 6340 Microdia'

Thaum kawg, koj tuaj yeem txuas koj lub DS18B20 qhov ntsuas kub mus rau Pi's GPIO lub taub hau. Kuv siv kuv daim ntawv qhia zaub mov kom ua cov txheej txheem tsim cov khoom siv yooj yim dua, thiab kuv xav kom koj ua zoo ib yam, tshwj xeeb tshaj yog DS18B20 xav tau 4.7k tus tiv thaiv kom muab nruab nrab ntawm ob ntawm nws peb tus pin. Qhov txuas no muab cov kab hluav taws xob zoo qhia qhov yuav ua li cas siv lub khob cij los txuas rau qhov ntsuas kub no.

Nplooj ntawv tom ntej ntawm cov lus qhia saum toj no tseem suav nrog cov kauj ruam xav tau los nyeem cov ntaub ntawv los ntawm DS18B20, thiab qhia koj yuav txheeb xyuas li cas nws ua haujlwm. Nws yog ib qho tseem ceeb kom ua cov teeb tsa no ua ntej koj tuaj yeem siv DS18B20 rau txoj haujlwm no. Peb tseem yuav koom ua ke cov piv txwv Python tsab ntawv los ntawm kev qhia rau hauv peb qhov kev tshuaj xyuas, yog li koj yuav xav kom nrawm nrawm hla cov cai no.

Thov kuj tseem ceeb ntawm koj tus DS18B20 tus lej tshwj xeeb. Nws yog tus lej pib nrog '28-'uas koj tau hla thaum lub sijhawm teeb tsa kev qhia. Koj yuav tsum tau nkag mus rau hauv qhov program Python yav tom ntej kom nws nyeem hauv qhov kub thiab txias.

Kauj ruam 2: Teeb tsa Dropbox

Teeb tsa Dropbox
Teeb tsa Dropbox

Txhawm rau kom koj Pi cuam tshuam nrog Dropbox, koj yuav tsum teeb tsa Dropbox app tshiab. Qhov no yuav muab cov ntsiab lus xav tau rau koj Pi los ua kev tswj hwm cov ntaub ntawv online siv Python. Piv txwv tias koj tau tsim tus lej Dropbox thiab nkag mus, koj tuaj yeem tsim daim ntawv thov tshiab uas siv 'Developers' cov ntawv qhia zaub mov xaiv. Saib daim duab saum toj no rau cov ntsiab lus ntawm cov kauj ruam tseem ceeb.

Hauv qhov 'Developers' menu, xaiv 'Kuv cov apps', tom qab ntawd nyem rau 'Tsim app' khawm. Txhawm rau ua tiav daim foos ua tiav, xaiv 'Dropbox API' ua raws los ntawm 'App Folder'. Thaum kawg, koj tuaj yeem xaiv lub npe tshwj xeeb rau koj li app hauv Dropbox. Nyem 'Tsim app'.

Tom qab ntawd koj yuav raug coj mus rau koj li app nplooj ntawv teeb tsa hauv Dropbox. Tsuas muaj ib yam ntxiv uas koj yuav tsum tau ua ntawm no - tsim koj tus kheej Access Token. Txhawm rau ua qhov no, nqes mus rau ntu 'OAuth 2' thiab hauv qab 'Generated access token', nyem rau 'Generate' khawm.

Qhov no yuav nthuav qhia koj nrog txoj hlua ntev ntawm cov cim uas xav tau txhawm rau nkag mus rau koj tus lej Dropbox siv Python. Ua ib qho kev ceeb toom ntawm Access Token no raws li koj yuav tsum tau hais qhia nws tom qab hauv koj cov cai. Yog tias koj poob tus cim, koj tuaj yeem rov qab mus rau koj lub app teeb tsa los ntawm txhaj 'Kuv cov apps' hauv Dropbox 'Cov Tsim Kho' ntu thiab tsim lub cim tshiab.

Koj tuaj yeem tawm ntawm lwm qhov chaw raws li lawv nyob. Txhawm rau lees paub tias koj lub app tau tsim cov ntawv tais ceev tseg uas tsim nyog ntawm koj tus lej Dropbox, taw rau koj lub vev xaib cia thiab saib rau 'Apps' nplaub tshev. Tsis pub dhau lub nplaub tshev no yuav tsum yog cov ntawv tais ceev tseg nrog lub npe koj xaiv rau koj li app tshiab. Nov yog qhov uas txhua cov ntaub ntawv rau koj lub kaw lus saib xyuas yuav raug muab tso rau.

Kauj Ruam 3: Npaj Koj Lub Dropbox App Folder

Npaj Koj Lub Dropbox App Folder
Npaj Koj Lub Dropbox App Folder

Thaum koj tau teeb tsa koj li Dropbox app, nws yog lub sijhawm xav txog yuav ua li cas koj yuav siv cov ntawv tais ceev tseg hauv koj tus lej Dropbox los cuam tshuam nrog koj Pi. Qhov no yog ua tiav yooj yim heev. Python tsab ntawv uas yuav ua haujlwm ntawm Pi yuav siv cov npe ntawm cov lus txib los ntawm Dropbox API txhawm rau tshawb thiab hloov kho cov npe ntawm qee qhov khoob, txuas ntxiv-tsawg cov ntaub ntawv hauv koj daim ntawv thov. Peb yuav hu cov ntaub ntawv no 'cov ntaub ntawv ntsuas' raws li txhua tus yuav tso cai rau koj los tswj hwm qhov sib txawv ntawm kev saib xyuas tus cwj pwm. Cov duab saum toj no qhia txog plaub qhov ntsuas cov ntaub ntawv uas yuav tsum muaj nyob hauv koj li Dropbox app daim ntawv rau qhov haujlwm no. Tsim lawv yog qhov yooj yim:

Pib nrog koj daim ntawv thov tsis muaj dab tsi kiag li, qhib qhov program editor hauv koj lub khoos phis tawj. Thaum qhov no tuaj yeem ua tiav siv Pi, Kuv pom nws yooj yim dua los siv kuv lub khoos phis tawj Windows rau theem teeb tsa no. Thaum cov ntawv sau tau qhib (Kuv siv Notepad ntawm Windows 7), txhua yam koj yuav tsum tau ua yog khaws cov ntawv tsis muaj txhij txhua nyob hauv koj lub computer. Raws li peb tus piv txwv thawj zaug, peb yuav tsim thawj qhov ntsuas hauv cov duab header. Npe cov ntaub ntawv 'ncua = 10' thaum koj khaws nws.

Txhawm rau rov ua dua, tam sim no koj yuav tsum muaj cov ntawv sau tseg hauv koj lub computer nrog lub npe 'ncua = 10'. Cov ntaub ntawv tseem yuav muaj qhov '.txt' txuas ntxiv uas yuav lossis tsis pom.

Cov kauj ruam tom ntej yog xa cov ntawv no mus rau koj li Dropbox app app. Qhov no zoo ib yam li lwm qhov Dropbox upload. Cias mus rau koj lub app daim nplaub tshev thiab nyem 'Upload' thiab xaiv koj li 'ncua = 10' cov ntawv.

Thaum cov ntaub ntawv no tau rub tawm, koj yuav tsum tshem qhov '.txt' txuas ntxiv uas tam sim no yuav tsum pom hauv lub npe. Txhawm rau ua qhov no, tsuas yog nyem rau ntawm cov ntawv thiab xaiv 'Rename'. Tshem qhov '.txt' ib feem ntawm lub npe ntawv. Tam sim no koj yuav tsum sab laug nrog cov ntawv hu ua 'ncua = 10' tsis muaj daim ntawv txuas ntxiv, raws li pom hauv daim duab taub hau.

Cov ntaub ntawv 'ncua' qhov ntsuas yog ib ntawm plaub uas yuav siv los ntawm txoj haujlwm tshuaj xyuas. Txhawm rau tsim lwm tus, koj tuaj yeem tsuas yog theej thiab hloov npe koj cov ntaub ntawv 'ncua' los ntawm txoj nyem rau nws. Thaum koj tau tsim peb daim ntawv theej, sau lawv raws li qhia hauv daim duab hauv paus kom koj daim ntawv thov app zoo ib yam rau qhov uas tau qhia thaum pib ntawm cov kauj ruam no.

Kauj Ruam 4: Pib Nrog Txoj Cai

Raws li tau tham, qhov tseem ceeb ntawm peb qhov kev tshuaj xyuas yuav suav nrog ib tsab ntawv Python uas yuav cuam tshuam nrog Dropbox. Txhawm rau saib xyuas qhov haujlwm kom ua haujlwm, tsab ntawv no yuav tsum tau khiav hauv keeb kwm yav dhau los ntawm koj Pi. Kuv twv nws yog qhov tseeb tshaj plaws piav raws li 'daemon' tsab ntawv, lub ntsiab lus koj tuaj yeem tsuas yog teeb tsa nws ua haujlwm thiab tsis nco qab txog nws. Tsab ntawv tau txuas nrog cov theem no, yog li tsis muaj kev nkag siab hauv kev rov ua dua cov cai ntawm no. Tam sim no yuav yog lub sijhawm zoo los rub nws thiab paub koj tus kheej nrog nws.

Ua ntej koj yuav tuaj yeem sau tsab ntawv, nws yog ib qho tseem ceeb kom ntseeg tau tias koj muaj cov tsev qiv ntawv Python cuam tshuam. Qhov koj xav tau tau teev nyob rau sab saud ntawm tsab ntawv txuas. Lawv yog:

ntshuam dropbox ntshuam

ntshuam pygame.camera ntshuam os lub sijhawm ntshuam

Python teeb tsa ntawm kuv Pi twb suav nrog pygame, os thiab sijhawm yog li tsuas yog ib qho kuv yuav tsum tau teeb tsa yog Dropbox. Kuv tau ua qhov no siv lawv cov lus qhia teeb tsa yooj yim heev nrog pip.

Thaum koj lub tsev qiv ntawv tau teeb tsa, koj yuav tsum hloov kho ob kab saum toj kawg nkaus ntawm kab ntawv txuas kom haum koj li Dropbox Access Token thiab koj li DS18B20 qhov ntsuas kub qhov cim tshwj xeeb. Nov yog ob kab uas yuav tsum tau kho:

APP_ACCESS_TOKEN = '**********'

THERMOMETER_FILE = '/sys/bus/w1/devices/28-**********/w1_slave'

Tsuas yog hloov **** s nrog qhov tseeb raug. Txij ntawm no mus, koj tau npaj tiav tiag tiag los pib siv txoj haujlwm tshuaj xyuas! Hloov chaw tsuas yog dhia hauv, Kuv xav kom koj txuas ntxiv mus rau cov kauj ruam tom ntej rau kev nthuav dav dav ntawm cov cai.

TSEEM CEEB: Thaum koj khiav tsab ntawv no, koj xav kom nws khiav hauv keeb kwm yav dhau los kom a) koj tuaj yeem siv tus Pi txuas ntxiv, thiab b) thaum koj kaw koj qhov kev sib tham SSH, tsab ntawv yuav ua haujlwm txuas ntxiv mus. Nov yog cov lus txib kuv siv thaum kuv sau tsab ntawv:

nohup nab hab sej DropCamTherm.py &

Qhov no ua tiav peb yam: Nws yuav khiav tsab ntawv ('nab hab sej DropCamTherm.py'), nws yuav rov qab tswj mus rau kab hais kom sai li sai tau koj tuaj yeem siv Pi ('&'), thiab nws yuav xa Python cov txiaj ntsig uas yuav ib txwm pom tshwm ntawm kab hais kom ua rau hauv cov ntawv hu ua 'nohup.out'. Qhov no tuaj yeem nyeem tau siv Linux cov ntawv sau (kuv nyiam yog nano), thiab yuav raug tsim ncaj qha hauv cov npe uas cov ntawv tau ua.

Kauj Ruam 5: Khawb Qhov tob rau hauv Txoj Cai

Thaum koj qhib tsab ntawv, koj yuav pom tias nws suav nrog peb lub luag haujlwm nrog rau qhov thaiv ntawm cov cai uas siv cov haujlwm no thaum cov ntawv sau. Cov haujlwm siv Dropbox API thiab nkag mus rau DS18B20 qhov ntsuas kub ntsuas kom mloog cov lus txib los ntawm Dropbox thiab xa qhov ntsuas kub kawg. Hauv qab no yog cov ntsiab lus ntawm lub luag haujlwm ua dab tsi, thiab lawv tau siv los ua qhov kev tshuaj xyuas kev ua haujlwm li cas:

- cov_parameter ():

Txoj haujlwm no qhia lub hom phiaj ntawm Dropbox cov ntaub ntawv ntsuas peb tsim hauv qib 3. Nws tshawb xyuas Dropbox app nplaub tshev rau cov ntawv uas muaj cov ntawv 'param ='. Nws mam li rho tawm cov ntawv tom qab '=' thiab sim hloov nws mus rau hauv cov lej. Koj tuaj yeem pom tias qhov no tso cai rau peb tswj hwm txoj haujlwm los ntawm kev ntxiv cov lej cuam tshuam mus rau qhov kawg ntawm cov ntaub ntawv ntsuas tus kheej. Cov kauj ruam tom ntej yuav muaj cov ntawv qhia qhia luv qhia koj yuav siv li cas ntawm txhua qhov ntsuas cov ntaub ntawv los tswj ib qho ntawm txoj haujlwm.

- set_parameter (): cov

Txoj haujlwm no tso cai rau txoj haujlwm hloov npe cov ntaub ntawv ntsuas los ntawm hauv Python. Nws ua qhov no ntawm ob peb zaug, feem ntau yog txhawm rau txo qhov xav tau rau ntau phau ntawv hloov npe ntawm cov ntaub ntawv.

- set_latest_temp ():

Lub luag haujlwm no ua rau siv set_parameter () txhawm rau tso qhov ntsuas kub kawg rau Dropbox app nplaub tshev los ntawm kev ntxiv nws mus rau 'ntsuas kub' cov ntaub ntawv ntsuas. Lub luag haujlwm nyeem qhov ntsuas kub kawg los ntawm DS18B20 cov ntaub ntawv teev cia (uas muaj nyob ntawm Linux ntawm txoj kev taw qhia los ntawm THERMOMETER_FILE sib txawv).

Qhov kawg ntawm qhov kev zov me nyuam muaj cov cai uas yuav ua thaum cov ntawv sau. Tom qab qee qhov teeb tsa cov txheej txheem xav tau rau DS18B20 lub ntsuas, nws qhib Dropbox ntu siv koj li Access Token thiab siv pygame txhawm rau tshawb nrhiav koj lub vev xaib. Yog pom lub vev xaib, nws yuav nkag mus rau lub voj uas nws siv cov ntawv pov thawj () los rho tawm cov ntaub ntawv los ntawm Dropbox thiab ua rau nws.

TSEEM CEEB: Koj yuav pom cov kab hauv qab no:

cam = pygame.camera. Camera (cam_list [0], (864, 480))

… Qhov kev sim no los tsim lub koob yees duab uas siv tau los ntawm thawj lub vev xaib uas pygame pom. Qhov kev daws teeb meem yuav tsum tau hloov pauv kom haum koj lub vev xaib. Kev sim nrog tus lej ntawm qhov tseem ceeb txhawm rau nrhiav seb yam twg ua haujlwm zoo tshaj plaws.

Kauj Ruam 6: Siv Dropbox Parameter Files

Yog li tam sim no koj yuav tsum muaj tsab ntawv ua haujlwm uas, thaum khiav siv cov lus qhia los ntawm qib 4, yuav tso cai rau koj Pi pib saib xyuas daim ntawv thov app rau koj cov tswv yim. Ntawm koj thawj zaug khiav, daim ntawv thov app yuav tsum muaj cov ntaub ntawv ntsuas hauv qab no:

ncua = 10

exitprogram = 0 imagerequest = 0 kub = 0

Kev sib cuam tshuam nrog txoj haujlwm tau ua tiav los ntawm kev hloov npe tus kheej cov ntaub ntawv ntawm Dropbox. Txhawm rau ua qhov no, tsuas yog nyem rau ib qho ntawm cov ntawv thiab xaiv 'hloov npe'. Txhua qhov ntsuas cov ntaub ntawv muaj qhov ua haujlwm sib txawv:

- ncua:

Cov ntaub ntawv no qhia txog kev saib xyuas pes tsawg vib nas this kom tos ntawm txhua qhov rov ua dua ntawm kev saib xyuas lub voj. Thaum kuv paub tias kuv yuav tsis cuam tshuam nrog txoj haujlwm ntau, Kuv teeb nws rau 60 lossis 120. Thaum kuv paub tias kuv xav thov cov ntaub ntawv los ntawm Pi ntau zaus, kuv teeb nws rau 10.

- tawm qhov program:

Qhov no yuav tsum tau teeb tsa rau 1 lossis 0. Yog tias qhov program pom tias nws tau teeb tsa 1, nws yuav xaus tsab ntawv. Yog tias koj teeb nws rau 1 thiab tsab ntawv tawm mus, koj yuav tsum tau nkag mus rau Pi dua kom rov pib dua. Qhov ntsuas no muaj nyob yog li koj tuaj yeem ua tiav qhov kev tshuaj xyuas thaum koj tsis xav kom nws ua haujlwm ntxiv (piv txwv li, yog tias koj tau rov qab los tsev thiab tsis xav saib xyuas lub webcam nyob deb dua).

- kev thov duab:

Qhov no yog kab tias qhov tseem ceeb tshaj plaws. Qhov no yuav tsum tau teeb tsa rau 1 lossis 0. Yog tias qhov program pom tias nws tau teeb tsa 1, nws yuav thov cov duab los ntawm lub vev xaib thiab rub nws mus rau hauv daim nplaub tshev app (nrog lub npe 'image.jpg'). Yog tias muaj lwm qhov 'image.jpg' tshwm sim, nws yuav sau nws.

- kub:

Nov yog DS18B20 ntsuas kub ntsuas los ntawm set_latest_temp () muaj nuj nqi. Koj yuav tsum tsis tas yuav hloov kho cov ntaub ntawv ntsuas no - nws tau teeb tsa los ntawm txoj haujlwm.

Nco ntsoov tias yog tias koj teeb tsa 'programprogram' lossis 'imagerequest' rau 1, txoj haujlwm yuav cia li xa lawv rov qab mus rau 0 ua ntej ua tiav cov cai tsim nyog. Qhov no yog kom yooj yim. Koj kuj tseem tuaj yeem pom tias cov cai muaj ntau qhov 'sim' thiab 'tshwj tsis yog' thaiv ib puag ncig ntau ntawm cov haujlwm tseem ceeb. Qhov no yog kom ntseeg tau tias tsab ntawv yuav tsis cuam tshuam qhov tshwj xeeb (thiab yog li tsis ua haujlwm) yog tias muaj qee yam tsis raug (xws li teeb meem txuas hauv internet tiv thaiv kev nkag mus rau Dropbox).

Kauj Ruam 7: Xaus

Txoj haujlwm no tau nthuav qhia txoj hauv kev los tswj Raspberry Pi siv Python thiab Dropbox. Thaum kho vajtse siv hauv txoj haujlwm no yog ntsuas kub thiab USB lub vev xaib, muaj ntau lwm daim ntawv thov rau txoj kev tswj hwm Pi. Qhov tseeb, ib qho khoom siv kho vajtse uas nkag tau los ntawm GPIO tuaj yeem tswj tau siv cov qauv txheej txheem zoo sib xws, ua rau lub kaw lus yooj yim nthuav dav.

Raws li cov kauj ruam tom ntej, koj kuj tseem tuaj yeem siv GUI lub tsev qiv ntawv xws li Tkinter nrog rau Dropbox API los tsim cov haujlwm pabcuam uas yuav tso cai rau koj hloov kho cov ntaub ntawv ntsuas yam tsis tas yuav nkag mus rau Dropbox.

Kuv vam tias qhov kev qhia no tau hais meej, thiab yog tias koj muaj lus nug lossis xav kom kuv qhia meej dab tsi, thov tshaj tawm!

Pom zoo: