Cov txheej txheem:
- Kauj Ruam 1: Lub Rooj Saib Xyuas Kev Pom Zoo Digital Ua Haujlwm Li Cas?
- Kauj Ruam 2: Yam Yuav Tsum Tau:
- Kauj Ruam 3: GUI Tsim rau Cov Lus Ceeb Toom:
- Kauj Ruam 4: Teeb Tus CloudMQTT Account:
- Kauj Ruam 5: Raspberry Pi Txoj Cai Kawg piav qhia:
- Kauj Ruam 6: Windows PC GUI:
- Kauj Ruam 7: Windows PC Txoj Cai Kawg piav qhia:
- Kauj Ruam 8: Teeb tsa Cov Ntawv Ceeb Toom Digital:
Video: Cov Ntawv Ceeb Toom Digital Siv Raspberry Pi thiab MQTT raws tu qauv: 8 Kauj Ruam
2024 Tus sau: John Day | [email protected]. Kawg hloov kho: 2024-01-30 09:27
Cov ntawv ceeb toom yuav luag siv rau txhua qhov chaw, xws li chaw ua haujlwm, tsev kawm ntawv, tsev kho mob, thiab tsev so. Lawv tuaj yeem siv rov ua dua los tso tawm cov ntawv ceeb toom tseem ceeb lossis tshaj tawm cov xwm txheej yav tom ntej lossis cov rooj sib tham. Tab sis daim ntawv ceeb toom lossis tshaj tawm yuav tsum tau luam tawm ntawm daim ntawv thiab khawm rau ntawm daim ntawv ceeb toom.
Hauv Cov Lus Qhia no cia peb kawm tsim peb Cov Ntawv Ceeb Toom Digital nrog Raspberry Pi kom txuag tau ntau cov ntawv thiab cov toner!
Kauj Ruam 1: Lub Rooj Saib Xyuas Kev Pom Zoo Digital Ua Haujlwm Li Cas?
- Raspberry Pi txuas nrog lub HDMI Display uas yog peb Cov Ntawv Ceeb Toom Digital.
- Lub Windows PC tau siv los tshaj tawm tsab ntawv ceeb toom ntawm Digital Board Board hauv internet.
- Daim ntawv ceeb toom luam tawm los ntawm Windows PC tau txais los ntawm Digital Notice Board los ntawm CloudMQTT broker.
- Kev sib txuas lus ntawm Windows PC thiab Digital Notice Board tau ua tiav los ntawm MQTT raws tu qauv.
Kauj Ruam 2: Yam Yuav Tsum Tau:
- Raspberry Pi nrog Rasbian OS
- Zaub nrog HDMI chaw nres nkoj
- Windows PC
- Kev Sib Txuas Internet
- CloudMQTT tus account
Kauj Ruam 3: GUI Tsim rau Cov Lus Ceeb Toom:
Peb yuav tsum tsim 2 GUIs, ib qho rau Raspberry Pi los tso tawm daim ntawv ceeb toom ntawm HDMI Zaub thiab lwm qhov rau Windows PC kom tshaj tawm tsab ntawv ceeb toom rau Raspberry Pi ntawm CloudMQTT broker.
Kev tsim GUI nyob ntawm qhov chaw uas koj yuav tso rau Digital Board Board. Piv txwv li, cia kuv tsim GUI rau Chaw Ua Haujlwm Qhia Ntawv kom nthuav tawm cov xwm txheej yav tom ntej thiab cov rooj sib tham kom cov neeg ua haujlwm tuaj yeem hloov kho nrog cov ntaub ntawv tshiab kawg.
Nws yog qhov yooj yim los tsim GUI hauv Windows PC, yog li cia peb tsim Cov Ntawv Ceeb Toom Digital GUI hauv Windows PC thiab luam cov cai rau Raspberry Pi.
Software yuav tsum tau:
Anaconda (uas suav nrog nab nab 2.7, Qt Designer pob thiab Spyder IDE).
Qt Tus Tsim Qauv yog lub cuab yeej siv los tsim GUIs. Qhov tsim tawm ntawm Qt Tus Tsim Qauv yuav yog.ui cov ntaub ntawv, tom qab ntawd nws tuaj yeem hloov pauv mus rau.py rau txheej txheem ntxiv.
Dab tsi tshwm sim hauv video?:
- Rub tawm Anaconda Windows Installer rau nab hab sej 2.7 thiab nruab nws hauv Windows PC (txheej txheem teeb tsa ib txwm muaj).
- Tom qab teeb tsa, koj tuaj yeem pom Qt Tus Tsim Qauv cuab yeej hauv "installation_directory / Library / bin / designer.exe" (rau kuv nws yog "C: / Anaconda2 / Library / bin / designer.exe")
- Tsim qhov luv rau "designer.exe" thiab muab tso rau ntawm lub desktop.
- qhib "designer.exe".
- Tsim lub qhov rai tshiab.
- Xaiv thiab tso cov txheej txheem thiab cov kev xav tau (saib cov ntawv, saib daim ntawv lo, thiab lwm yam).
- Txuag ua ntaub ntawv Rpi_UI.ui.
- Txhawm rau hloov nws mus rau hauv.py cov ntaub ntawv qhib cmd tam sim hauv daim nplaub tshev tam sim no qhov twg Rpi_UI.ui cov ntaub ntawv muaj thiab ntaus cov lus txib hauv qab no
installation_directory / Library / bin / pyuic5.bat -x RPi_UI.ui -o RPi_UI.py
rau kuv nws yog, C: / Anaconda2 / Library / bin / pyuic5.bat -x RPi_UI.ui -o RPi_UI.py
cov lus txib no yuav hloov Rpi_UI.ui cov ntaub ntawv rau Rpi_UI.py cov ntaub ntawv thiab muab tso rau hauv tib cov npe.
- Qhib Rpi_UI.py cov ntaub ntawv nrog Spyder IDE uas suav nrog hauv Anaconda.
- Khiav cov ntawv yuav tso saib GUI peb tau tsim ua ntej.
Tom ntej no, cia peb teeb tsa CloudMQTT tus account.
Kauj Ruam 4: Teeb Tus CloudMQTT Account:
- Mus ntsib qhov txuas no.
- Tsim ib tus as khauj nrog E-mail thiab nkag rau hauv koj tus as khauj.
- Tsim qhov piv txwv tshiab (Kuv npe nws li TEST_1).
- Qhib cov ntaub ntawv Instance.
- Nco tseg ntawm Server, Tus Neeg Siv, Tus Kheej, thiab Chaw Nres Nkoj.
- Xa mus rau CloudMQTT Python Cov Ntaub Ntawv thiab khaws cov ntawv ua CloudMQTT.py.
- Cov piv txwv tus lej hauv cov ntaub ntawv xav tau tsev qiv ntawv paho, Nruab Paho Python Client siv cov cuab yeej pip, qhib cmd sai li tus thawj coj thiab sau cov lus txib hauv qab no.
pip nruab paho-mqtt
Kauj Ruam 5: Raspberry Pi Txoj Cai Kawg piav qhia:
Ntawm no, cia kuv piav qhia txoj kev kuv ua ke RPi_UI.py cov ntaub ntawv nrog CloudMQTT.py thiab khaws nws li RPi_UI.py.
Ntshuam tsev qiv ntawv, yog tias nws tsis tau teeb tsa tsuas yog nruab nws
ntshuam paho.mqtt.client li mqtt
ntshuam urlparse los ntawm PyQt5 ntshuam QtGui, QtWidgets, QtCore los ntawm PyQt5. QtCore ntshuam QTimer, QTime los ntawm threading ntshuam ntshuam sys ntshuam rov los ntawm google_drive_downloader ntshuam GoogleDriveDownloader li gdd ntshuam os
Txhawm rau nruab googledrivedownloader, siv qhov hais kom ua
pip nruab googledrivedownloader
Initializing zog,
icon = "qhia tau- [email protected]"
contestImg = "black" meeting1 = "Meeting1:" venue1 = "Time and venue1." meeting2 = "Meeting2:" venue2 = "Sijhawm thiab chaw 2." meeting3 = "Meeting3:" venue3 = "Sijhawm thiab chaw 3."
Ua raws los ntawm chav kawm Ui_MainWindow
chav kawm Ui_MainWindow (kwv):
def setupUi (tus kheej, MainWindow):… def retranslateUi (tus kheej, MainWindow):… def _update (tus kheej):…
Cov kab hauv qab no hauv kev teeb tsa kev ua haujlwmUi hloov kho GUI txhua 3 vib nas this los ntawm kev hu rau _update muaj nuj nqi
tus kheej.retranslateUi (MainWindow)
QtCore. QMetaObject.connectSlotsByName (MainWindow) self.timer = QTimer () self.timer.timeout.connect (self._update) self.timer.start (3000)
Lub luag haujlwm on_message tos rau cov lus los ntawm tus tswv lag luam, thaum cov lus tau txais nws rub tawm cov duab los ntawm google tsav siv lub google drive sharable txuas ID thiab tseem hloov qhov txiaj ntsig ntawm kev hloov pauv thoob ntiaj teb
def on_message (tus thov kev pab, ob, msg):
print (str (msg.payload)) yog (str (msg.payload)): noticeReceived = str (msg.payload) tshwm sim = re.search ('%1 (.*)%2 (.*)%3 (. *)%4 (.*)%5 (.*)%6 (.*)%7 (.*)%8 ', ceeb toom tau txais) kev sib tw thoob ntiaj tebImg thoob ntiaj teb kev sib tham 1 thoob ntiaj teb chaw 1 ntiaj teb kev sib tham 2 thoob ntiaj teb kev sib tham 2 thoob ntiaj teb qhov chaw 3 fileId = "" +result.group (1)+"" path = "/home/pi/Desktop/Instructables/RPi UI/ContestImages/"+result.group (1)+". jpg" gdd.download_file_from_google_drive (file_id = fileId, dest_path = path) contestImg = result.group (1) meeting1 = result.group (2) venue1 = result.group (3) meeting2 = result.group (4) venue2 = result.group (5) meeting3 = result.group (6) qhov chaw 3 = result.group (7)
Txoj cai muaj 2 lub voj voog tsis muaj qhov kawg,
rc = mqttc.loop ()
thiab
sys.exit (app.exec_ ())
Txhawm rau khiav cov loops ib txhij, Kuv tau siv Threading lub tswvyim
def sqImport (tId): yog tId == 0: thaum 1: rc = 0 thaum rc == 0: rc = mqttc.loop () print ("rc:" + str (rc)) yog tId == 1: thaum 1: app = QtWidgets. QApplication (sys.argv) MainWindow = QtWidgets. QMainWindow () ui = Ui_MainWindow () ui.setupUi (MainWindow) MainWindow.show () sys.exit (app.exec_ ()) threadA = Xov (phiaj) = sqImport, args = [0]) threadB = Xov (phiaj = sqImport, args = [1]) threadA.start () threadB.start () threadA.join () threadB.join ()
Txias, peb tau ua tiav Raspberry Pi teeb tsa, tom ntej no cia peb tsim GUI rau Windows PC los tshaj tawm cov lus rau Raspberry Pi.
Kauj Ruam 6: Windows PC GUI:
- Tsim GUI rau windows thiab txuag nws li Windows_UI.ui.
- Hloov nws mus rau hauv cov ntaub ntawv sej.
- Muab nws nrog CloudMQTT.py cov ntaub ntawv thiab khaws nws li Windows_UI.py.
- Kev ua haujlwm ntawm Windows_UI.py cov ntaub ntawv zoo ib yam li RPi_UI.py cov ntaub ntawv, qhov sib txawv tsuas yog Windows_UI.py cov ntawv tshaj tawm cov lus thaum RPi_UI.py tau txais cov lus.
Kauj Ruam 7: Windows PC Txoj Cai Kawg piav qhia:
- Windows_UI.py cov ntaub ntawv muaj txhua chav kawm thiab ua haujlwm ntawm RPi_UI.ui tshwj tsis yog ob peb.
- Hloov chaw ntawm on_message muaj nuj nqi, nws muaj on_publish muaj nuj nqi los tshaj tawm cov lus.
- Cov cai hauv qab no tsis pub dhau retranslateUi muaj nuj nqi hu rau kev tshaj tawm ib zaug thaum PUBLISH khawm tau nyem.
self.pushButton.clicked.connect (self.publish)
- Cov ntawv tshaj tawm ua haujlwm sib koom ua ke google drive sib koom sib txuas ID thiab cov ntaub ntawv sib tham thiab tshaj tawm nws nyob hauv qab lub ntsiab lus "ceeb toom".
- Cov lus no yuav tau txais los ntawm Raspberry Pi.
Kauj Ruam 8: Teeb tsa Cov Ntawv Ceeb Toom Digital:
- Txuas Raspberry Pi mus rau HDMI zaub, Kuv tau siv kuv lub Sony TV ua Digital Digital Board Board Display.
- Khiav RPi_UI.py cov ntaub ntawv hauv Raspberry Pi.
- Khiav Windows_UI.py cov ntaub ntawv hauv Windows PC.
- Nkag mus rau Google tsav txuas ID ntawm daim duab sib tw thiab tshaj tawm lub rooj sib tham.
- Nyem rau PUBLISH khawm.
- Tam sim no koj tuaj yeem pom daim ntawv ceeb toom Digital hloov tshiab tsis pub dhau ob peb feeb.
Cov lus qhia:
- Koj tuaj yeem tsim tus naj npawb xav tau ntawm Cov Ntawv Ceeb Toom Digital thiab Cov laug cam tuaj yeem tso npe rau Cov ncauj lus sib txawv.
- Txhawm rau ua Windows_UI.py cov ntawv nqa tau, koj tuaj yeem hloov cov ntaub ntawv mus rau hauv cov ntaub ntawv ua tiav siv pyinstaller, yog li koj tuaj yeem ua tiav cov ntaub ntawv ua tiav hauv txhua lub Windows PC yam tsis tau txhim kho cov tsev qiv ntawv xav tau hauv PC.
Ua tsaug
SABARI KANNAN M.
Pom zoo:
GPS Tsheb Tracker Nrog SMS ceeb toom thiab Thingspeak Cov Ntaub Ntawv Upload, Arduino Raws, Tsev Hauv Tsev: 5 Cov Kauj Ruam (nrog Duab)
GPS Tsheb Tracker Nrog SMS Ceeb Toom thiab Cov Ntaub Ntawv Hais Lus Upload, Arduino Raws, Tsev Hauv Tsev: Kuv tau ua qhov GPS tracker xyoo tas los thiab txij li nws ua haujlwm zoo Kuv tshaj tawm nws tam sim no ntawm Kev Qhia. Nws txuas nrog cov khoom siv txuas rau hauv kuv lub cev.Qhov GPS tracker uploads lub tsheb txoj haujlwm, nrawm, taw qhia thiab ntsuas kub ntawm lub xov tooj ntawm tes
Kev Ceeb Toom Thaum Ntxov Raspberry PI Txoj Kev Siv Teeb Siv Dav Dav Qhia Cov Ntaub Ntawv: 14 Cov Kauj Ruam (nrog Duab)
Kev Ceeb Toom Thaum Ntxov Raspberry PI Kev Siv Lub Teeb Siv Dav Dav Qhia Cov Ntaub Ntawv: Lub teeb no tau los ntawm ntau qhov laj thawj vim tias kuv ib txwm nyiam cov dav hlau uas ya saum taub hau thiab thaum lub caij ntuj sov nyob rau hnub so muaj ntau qhov zoo nkauj zoo nkauj ya ncig. Txawm hais tias koj tsuas yog nyiam hnov lawv thaum lawv mus pas
Ceeb Toom Cov Neeg Tuaj Saib Lub Vev Xaib ceeb toom Nrog IFTTT: 6 Cov Kauj Ruam
Kev ceeb toom Cov Neeg Tuaj Saib Lub Vev Xaib Nrog IFTTT: Hauv cov lus qhia no, koj yuav tau txais Android ceeb toom thaum ib tus neeg mus ntsib koj li Website.so rau qhov no Koj yuav tsum muaj kev paub me ntsis ntawm PHP programming lus thiab Kev paub yooj yim ntawm C Yam Lus kom paub li cas IFTTT App cov haujlwm (
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
Lus Ceeb Toom Arduino Tshuab Ntxhua Khaub Ncaws - Thawb Ceeb Toom rau Xov Tooj Nrog Blynk: 5 Cov Kauj Ruam (nrog Duab)
Lus Ceeb Toom Arduino Tshuab Ntxhua Khaub Ncaws - Thawb Ceeb Toom rau Xov Tooj Nrog Blynk: Peb lub tshuab ntxhua khaub ncaws nyob hauv lub nkas -las thiab peb tsis hnov lub suab nrov nrov los qhia tias ntxuav tas lawm. Kuv xav nrhiav txoj hauv kev kom tau txais kev ceeb toom, txhua qhov chaw peb nyob hauv tsev, thaum lub voj voog tiav lawm. Kuv tau tinkering nrog Arduino, ESP8266 WiFi