Cov txheej txheem:
- Kauj ruam 1: Kho vajtse
- Kauj ruam 2: Software
- Kauj Ruam 3: Tsim Webpage thiab Webserver
- Kauj Ruam 4: Txhim Kho Lub Vev Xaib thiab Kho Tus Kheej Tsim
- Kauj Ruam 5: Teeb Tus Khawm Push
Video: Raspberry Pi: Phab Ntsa Mounted Calendar thiab Chaw Qhia Ntawv: 5 Kauj Ruam (nrog Duab)
2024 Tus sau: John Day | [email protected]. Kawg hloov kho: 2024-01-30 09:30
Ua ntej "hnub nyoog digital" ntau tsev neeg tau siv daim ntawv qhia hnub ntsa los qhia qhov pom txhua hli ntawm cov xwm txheej yuav los tom ntej. Cov ntawv niaj hnub no ntawm phab ntsa teeb daim ntawv qhia hnub suav nrog cov haujlwm yooj yim ib yam:
- Cov txheej txheem txhua hli
- Sync ntawm tsev neeg cov dej num
- Xauj yooj yim ntawm lub hlis
Dhau ntawm cov haujlwm yooj yim no lub cuab yeej tseem yuav ua haujlwm:
- Ib qho kwv yees
- Cov xwm txheej yuav los tom ntej hauv ib puag ncig
- Cov ntaub ntawv qhia txog kev thauj mus los rau pej xeem
- Thiab ntau dua…
Koj xav tau dab tsi:
- Raspberry Pi 2
- USB Wifi Dongle. (Zoo li Edimax 150Mbps Wireless nano)
- LCD lub vijtsam laptop (nqa ib qho los ntawm lub laptop tawg
- Daim npav tswj hwm rau lub vijtsam laptop (tshawb nrhiav Ebay rau LCD Tus Thawj Tswj Tsav Tsheb thiab tus lej ntawm koj lub laptop screen)
- Qee Qhov Khawm Hloov Hloov (Zoo li
- Webserver khiav lub vev xaib raug cai
- Ntoo ntoo. Qhov siab yuav tsum ntau dua 30 hli, yog li cov khoom siv hluav taws xob tuaj yeem haum sab hauv. Qhov dav thiab qhov siab nyob ntawm qhov loj ntawm koj lub laptop screen.
- Ntawv ntawm cork. (Zoo li qhov no
- Luv HDMI cable
- Muaj zog ntxiv rau tswj hwm pawg tswj hwm thiab Raspberry Pi.
- Foamcore
- Kua nplaum
- Ntsia ntsia hlau.
(Kev tshoov siab los ntawm kev qhia los ntawm Piney
Kauj ruam 1: Kho vajtse
Nov yog teeb tsa kho vajtse.
- Nrhiav lub laptop LCD screen. Hais kom lub rooj tswj hwm ntawm Ebay. Tshawb nrhiav LCD Tus Thawj Tswj Tsav Tsheb thiab tus lej ntawm koj lub laptop screen. Ntau ntxiv:
- Craft ib daim ntoo. Qhov siab yuav tsum ntau dua 30 hli, yog li cov khoom siv hluav taws xob tuaj yeem haum sab hauv. Qhov dav thiab qhov siab nyob ntawm qhov loj ntawm koj lub laptop screen, muaj cov npoo rau ntxiv 10 hli ntawm txhua sab. Txiav tawm thiab ua chaw rau cov khoom siv hluav taws xob nyob tom qab. Laum qhov rau cov nyees khawm thiab cov xov hlau.
- Kaw lub laptop screen. Kuv siv lub thav duab qub ntawm lub khoos phis tawj.
- Txiav tawm foamcore nrog tuab tuab raws li qhov screen. thiab muab lo rau ntawm daim ntoo.
- Npog txhua sab nrog cork. Txiav nrog "rab riam txiav tawm" thiab lo nrog "kua nplaum".
- Nias lub Push Button. Siv lub laum loj, thiab ua tib zoo siv tes.
- Txuas cov khoom siv hluav taws xob. Txuas peb ntawm Push Button rau GPIO-pins 19/20/21 thiab hauv av. https://ms-iot.github.io/content/images/PinMappin… Nrhiav tus pin rau On/Off khawm rau lub rooj tswj hwm, thiab txuas nws nrog khawm Plaub Plaub. (Koj yuav pom nws los ntawm kev sim txuas hauv av rau txhua tus pin, tam sim ntawd lub LCD yuav taws teeb). Thaum kawg, txuas HDMI cable ntawm Raspberry thiab lub rooj tswj hwm, thiab txuas lub vijtsam mus rau lub rooj tswj hwm.
Kauj ruam 2: Software
Kev teeb tsa yog ua cas tig Raspberry Pi rau hauv kiosk. OS yuav pib lub vev xaib nyob rau hauv hom puv npo, thiab Push Button tau siv los tswj cov ntaub ntawv ntawm lub vev xaib. Kev teeb tsa yog:
- Nruab Raspbain ntawm Raspberry Pi (https://www.raspberrypi.org/documentation/installation/noobs.md)
- Sau npe rau Google Calender. (https://calendar.google.com). Ntxiv koj qhov kev tshwm sim tuaj. Nug kom nkag mus rau koj tsev neeg daim ntawv qhia hnub, lossis tsim kom muaj qhov tshwj xeeb "tsev neeg daim ntawv qhia hnub nyoog" thiab muab cov neeg hauv tsev neeg so rau nws. Ua kom koj daim ntawv qhia hnub muaj zog dua los ntawm kev ntxiv daim qhia hnub hli sab nraud. Cov xwm txheej hauv Facebook, hnub so rau pej xeem, thiab tus lej rau lub lim tiam tau ua haujlwm rau kuv. Ntau qhov kev tshoov siab ntawm no:
- Teeb tsa lub vev xaib thiab lub vev xaib
- Nruab ib lub web browser thiab hloov kho daim ntawv qhia hnub
- Teeb tsa cov nyees khawm
Nyeem ntxiv kom paub meej txog 3-5.
Kauj Ruam 3: Tsim Webpage thiab Webserver
Lub vev xaib yog daim ntaub thaiv uas Raspberry Pi yuav tso tawm. Cov canvas tuaj yeem sau nrog cov ntaub ntawv. Kuv yuav qhia koj yuav ua li cas kuv thiaj li teeb tsa google callender. Txoj cai embeed yog tsim los ntawm googles tus kheej thov. Cov youtube no qhia yuav ua li cas kom nws ua haujlwm:
Google Calendar tau tsim hauv cov keyboard luv. Nias N thiab lub hlis tom ntej yuav tshwm sim, nias P thiab lub hli dhau los tau qhia. Qhov no yuav ua haujlwm tsuas yog thaum tus tsom mus rau. Kuv tau tsim JavaScript uas ua kom ntseeg tau tias ua kom raug.
Ib qho piv txwv ntawm cov ntaub ntawv html tau txuas (hloov lub npe los ntawm index.html.txt rau index.html). Txog kev ceev ntiag tug, Kuv tau hloov qee qhov ntawm cov cai nrog "*_ REPLACED _*". Hloov chaw, siv embeed code tsim los ntawm google.
Xwb muab cov ntawv index.html ntawm koj tus kheej lub vev xaib, lossis tig koj li Raspberry Pi rau hauv lub vev xaib thiab tuav nws hauv zos. Yog tias koj twb muaj lub vev xaib txuas ntxiv mus rau kauj ruam tom ntej. Nruab ib lub vev xaib los ntawm kev ua raws li phau ntawv qhia no:
sudo cp index.html /var/www/html/index.html
Kauj Ruam 4: Txhim Kho Lub Vev Xaib thiab Kho Tus Kheej Tsim
Muaj ntau lub web browser tawm muaj. Tab sis kuv tsuas pom ib qho uas tuaj yeem ua raws peb qhov kev xav tau no; 1) tuaj yeem ua tus txheej txheem niaj hnub ntawm google daim ntawv qhia hnub, 2) muaj hom puv npo, 3) tuaj yeem ua haujlwm hauv zos CSS. CSS hauv zos tau siv los hloov qhov tshwm sim ntawm google daim ntawv qhia hnub. Kev rov kho dua tsis tuaj yeem ua tiav ntawm lub vev xaib, vim tias CSS tau kos los ntawm lwm lub server (google-server).
Nruab Iceweasel (Firefox rau Linux)
Nruab qhov txuas ntxiv no rau Iceweasel:
Qhib "Stylish" txuas ntxiv tab hauv Iceweasel thiab hloov kho CSS kom ua rau google callander zoo dua. Se txuas cov ntaub ntawv kuv piv txwv.
Tam sim no, cia ua Iceweasel rau autostart thiab qhib koj lub vev xaib ntawm tus ID nkag mus. Ntaus qhov no hauv Linux davhlau ya nyob twg:
cd /home/pi//.config/autostart
nano cal.desktop
Sau cov hauv qab no rau hauv cov ntawv. Hloov "localhost" mus rau qhov chaw nyob qhov twg koj cov canvas-webpage tau khaws cia. Txuag thiab tawm.
[Desktop nkag]
Hom = Daim Ntawv Thov Npe = hemsida Exec = iceweasel localhost StartupNotify = cuav
Kauj Ruam 5: Teeb Tus Khawm Push
Cov Khawm Push yog siv los xaub rau pem hauv ntej thiab thim rov qab hauv daim ntawv qhia hli hli. Los ntawm lub neej ntawd qhov no ua tiav los ntawm nias "p" thiab "n" ntawm cov keyboard. Yog li cov nyees khawm yuav ua raws li ob lub keyboards cov lus txib.
Ua ntej tshaj, tsim ib tsab ntawv nab nab los ua kom lub pob nyem ua haujlwm:
Rub tawm thiab teeb tsa nab hab sej-uinput, tus nab nab API los tsim cov twj siv virtual: https://tjjr.fi/sw/python-uinput/ Raspbian tuaj nrog ob qho Python 2 thiab Python 3. Nco ntsoov tias koj nruab uinput nrog cov version koj siv.
Muab uinput-API thiab cov ntawv khawm ua ke. Tus nab nab nab zaum kawg yog txuas.
Pib-pib cov ntawv nab nab thaum pib: https://www.instructables.com/id/Raspberry-Pi-Laun… Peb lub launcher.sh yuav zoo li nqes hav. Hloov "/home/pi/py_switch" rau txoj hauv kev uas koj tau khaws cov ntawv nab nab.
cd / cov
cd /tsev /pi /py_switch sudo modprobe uinput sudo python switch.py cd /
Yog tag nrho!
Hloov tshiab:
Tus lej ntawm cov lus txib tuaj yeem txuas ntxiv nrog qee qhov yog-lwm-nqe lus hauv cov nab npawb sej. Kuv tau txuas qhov hloov pauv hloov pauv.py-file hauv cov kauj ruam no. Qhov tshiab yog tsab ntawv muaj cov lus txib hauv qab no.
- Nias lub pob 1 -> Qhov tseem ceeb nias “P” -> Xauj lub hli dhau los
- Nias lub pob 2 -> Ntsiab lus nias “N” -> Xauj lub hlis tom ntej
- Nias lub pob 3 -> Qhov tseem ceeb nias "M" lossis "A" -> hloov pauv ntawm lub hli -saib lossis txheej txheem -saib
- Nyem rau khawm ntev 3. -> Nyem rau "F5" -> Rov qab qhib lub vev xaib
- Nyem ib txhij khawm 1, 2, 3 -> ua lub plhaub hais kom ua "sudo reboot" -> Rov pib dua ntawm raspberry pi.
Pom zoo:
Tsev Kawm Ntawv Nroog Tsev Kawm Ntawv Chaw Nres Tsheb Daim Ntawv Qhia: 7 Kauj Ruam (nrog Duab)
University Campus Student Parking Map: Ntau tus tub ntxhais kawm xav paub tias lawv tuaj yeem nres tsheb hauv lub tsev kawm ntawv qib siab li cas. Txhawm rau daws qhov teeb meem no, Kuv tsim daim duab qhia chaw nres tsheb ntawm thaj chaw tseem ceeb ntawm Utah State University lub tsev kawm ntawv. Daim duab qhia chaw yog rau cov tub ntxhais kawm kom nrawm nrawm saib seb qhov chaw nres tsheb twg yog
RAWS LI COV NTAUB NTAWV NTSEEG NTAWV NTAWV MUAJ NTAWV TSHUAJ NTAWV TSO CAI RAU RASPBERRY PI: 6 Kauj Ruam (nrog Duab)
RAWS LI COV NTAUB NTAWV NTAWV MUAJ NTAWV TSHUAJ NTXIV RAU RASPBERRY PI: Hauv qhov haujlwm no, peb yuav txuas peb ntawm Atlas Scientific's EZO sensors (pH, yaj cov pa thiab kub) mus rau Raspberry Pi 3B+. Hloov chaw ntawm txuas cov kab hluav taws xob mus rau Raspberry Pi, peb yuav siv Whitebox Labs Tentacle T3 daim ntaub thaiv. T
Yaug Phab Ntsa-Mounted Raspberry Pi Touchscreen: 8 Kauj Ruam (nrog Duab)
Yaug Phab Ntsa-Mounted Raspberry Pi Touchscreen: Raspberry Pi 7 " Touchscreen yog qhov ua tsis tau zoo, muaj nqis ntawm cov thev naus laus zis. Kuv txiav txim siab kuv xav teeb tsa ib qho rau kuv phab ntsa los siv rau kev siv tshuab hauv tsev. Tab sis tsis muaj ib qho ntawm DIY mounts kuv pom online daws nrog cov teeb meem yuav ua li cas yaug nws nrog yam tsis muaj
Digital Wall Calendar thiab Chaw Qhia Hauv Tsev: 24 Kauj Ruam (nrog Duab)
Digital Wall Calendar thiab Chaw Qhia Xov Xwm Hauv Tsev: Hauv Phau Ntawv Qhia no Kuv yuav tig lub TV qub hauv TV rau hauv cov ntoo thav duab digital Phab Ntsa Mounted Calendar thiab Lub Tsev Qhia Ntawv Hauv Tsev siv los ntawm Raspberry Pi. cov ntaub ntawv tseem ceeb rau txhua tus tswv cuab ntawm th
Lub Plawv Zoo Li Cov Chaw Taws Teeb Tswj Rov Qab-Teeb Phab Ntsa Kho Kom Zoo Nkauj: 8 Kauj Ruam (nrog Duab)
Lub Plawv Zoo Li Qub Cov Khoom Siv Hluav Taws Xob Back-lit Wall Decor: Hauv no DIY lub tsev kho kom zoo nkauj khoom plig qhia, peb yuav kawm paub yuav ua li cas kom lub plawv zoo li lub backlit phab ntsa dai vaj huam sib luag siv plywood board thiab ntxiv ntau yam teeb pom kev zoo tswj tau los ntawm kev tswj chaw taws teeb thiab teeb sensor (LDR) siv Arduino. Koj c