Cov txheej txheem:

RPi-Zero IoT Qhov Taw Qhia / Xim Teeb: 6 Cov Kauj Ruam (nrog Duab)
RPi-Zero IoT Qhov Taw Qhia / Xim Teeb: 6 Cov Kauj Ruam (nrog Duab)

Video: RPi-Zero IoT Qhov Taw Qhia / Xim Teeb: 6 Cov Kauj Ruam (nrog Duab)

Video: RPi-Zero IoT Qhov Taw Qhia / Xim Teeb: 6 Cov Kauj Ruam (nrog Duab)
Video: Dais thiab nab qa sib xeem tsheb kauj vab 2024, Hlis ntuj nqeg
Anonim
RPi-Zero IoT Qhov Ntsuas Qhov Ntsuas / Xim Teeb
RPi-Zero IoT Qhov Ntsuas Qhov Ntsuas / Xim Teeb
RPi-Zero IoT Qhov Ntsuas Qhov Ntsuas / Xim Teeb
RPi-Zero IoT Qhov Ntsuas Qhov Ntsuas / Xim Teeb
RPi-Zero IoT Qhov Ntsuas Qhov Ntsuas / Xim Teeb
RPi-Zero IoT Qhov Ntsuas Qhov Ntsuas / Xim Teeb

Tsis muaj tus tswj hwm micro ntxiv, & Tsis muaj HAT ntxiv rau qhov xav tau. Qhov RPi-Zero ua txhua yam. Zoo dua tseem siv RPi-Zero W!

Piv txwv siv: Qhov Kev Pabcuam Lub Xeev Qhov Ntsuas (piv txwv li DowJonesIndex taug qab), Kev nom tswv lossis Kev ua kis las qhov xwm txheej qhia, lub teeb pom kev zoo, taug qab lub ntsuas cua, koj lub npe nws. Saib cov vis dis aus hauv qib 6.

Raspberry-Pi tsuas muaj ib qho kho vajtse txhawb PWM kab. Txoj haujlwm no xav tau 3 PWM kab, yog li kuv tau siv software tsav PWM 'c' library (https://wiringpi.com/reference/software-pwm-library/), uas yuav tsum tau teeb tsa.

Kuv tsoo qhov ua rau 2 txheej txheem. Ib qho, cuam tshuam kev tsav tsheb, hloov txoj kab tswj hwm mus rau LED raws li xav tau, tau txais nws txoj kev taug kev los ntawm nws cov 'stdin' kwj. Lwm qhov yog qhov xwm txheej tau tsav nodeJS server siv lub qhov hluav taws xob IO. Qhov no yog txhawm rau tiv thaiv tej yam zoo li lub teeb ci thaum ua kom ntseeg tau qhov ua tau zoo. Kev sib xyaw ua ke feem ntau siv tsawg dua 5% ntawm CPU. Thaum lub sijhawm hloov xim tas li (ntawm cov swb &/lossis ntau tus neeg siv khoom) nws tuaj yeem siv tau yooj yim dua 50% (tshwj xeeb tshaj yog thaum tseem siv qhov browser hauv Pi-Zero GUI). Nco ntsoov tias thaum hloov pauv los, hloov cov ntawv ceeb toom tawm mus rau txhua tus neeg qhib qhov khoom.

Kauj ruam 1: Yam Koj Yuav Tsum Tau

Yam Koj Yuav Tsum Tau
Yam Koj Yuav Tsum Tau
Yam Koj Yuav Tsum Tau
Yam Koj Yuav Tsum Tau
  • Pi-Zero micro-SD daim npav, 8 GB pom zoo. Nrog Raspbian-Linux lossis NOOBS
  • RGB Led (Kuv siv qhov no:
  • 3 cov neeg tawm tsam (tus nqi raws li xav tau tam sim no &/lossis qhov xav tau ci ci, 1/8 watt)
  • WiFi, USB dongle (piv txwv li https://www.ebay.com/itm/252018085448) lossis txawm tias zoo dua siv Raspberry Pi Z-W (nrog WiFi built-in)
  • rooj plaub (piv txwv li ib qho me me: https://www.ebay.com/itm/131583579374 nrog ntau qhov chaw:
  • diffuser (saib cov piv txwv hauv duab)
  • Cables thiab adapters raws li xav tau.

Xaiv tau, nyob ntawm seb koj xav txuas cov khoom siv li cas

  • lub taub hau (https://www.ebay.com/itm/14186077616)
  • dhia (https://www.ebay.com/itm/262235387520)
  • txoj cai kaum micro-USB adapter (Blue USB 2.0 OTG R)
  • mini USB hub, tsuas yog siv thaum teeb tsa theem

Kauj ruam 2: Pi-Zero Teeb, thiab Npaj rau Kev Txhim Kho

Ua raws li kev teeb tsa pib no rau koj PiZero, txhawm rau ua kom nws npaj rau kev txhim kho …

Thaum koj muaj daim npav microSD nrog NOOBS teeb tsa ces:

Txuas lub microSD daim npav rau hauv. Ua txuas lub zog qis USB Hub nrog Wifi dongle, keyboard thiab nas (Koj tuaj yeem siv lub wireless nas thiab/lossis keyboard, ib txoj hauv kev nws yuav, tab sis tsis zoo li, xav tau lub zog sab nraud rau lub hub). Kuv siv adapters thiab lub hub kuv twb muaj lawm.

Tam sim no txuas Tus Saib Xyuas thiab lub microUSB lub zog hloov pauv thiab Nws yuav khau raj. Txuas ntxiv thiab ua tiav cov lus qhia ntawm kev teeb tsa Raspbian, Debian Linux, raws li pom hauv noobs-teeb tsa txuas saum toj no.

Ib qho ntxiv, kuv muaj qhov kev daws teeb meem qis dhau. Yog li kuv ntxiv cov kab no rau /boot /config.txt

disable_overscan = 1

hdmi_group = 2 hdmi_mode = 58

Hdmi_mode = 58 ua haujlwm rau kuv saib, koj yuav xav tau lwm yam ntxiv.

xa mus: ua-raspberry-pi-use-full-resolution-monitor thiab

raspberrypi.org/documentation/configuration/config-txt.md

Tom qab booting Pi-Zero nkag mus rau hauv GUI interface.

Txhawm rau siv tag nrho qhov loj me ntawm kuv daim npav microSD Kuv siv raspi-teeb tsa #1 'Nthuav Tawm Cov Ntaub Ntawv' xaiv los ntawm kab hais kom ua, hauv lub davhlau ya nyob twg qhov rai, nkag mus 'sudo raspi-config'Refer to: ntaub ntawv/teeb tsa/raspi -config.md

Tsis tas li kuv tau hloov cov teeb tsa no hauv qab #5 'Kev Xaiv Txawv Tebchaws'

  • Qhov chaw: en_US. UTF-8 UTF-8
  • Timezone: America… Los_Angeles
  • Keyboard Layout: Generic 105-key (Intl) PC… Lus Askiv (Asmeskas)

Rau kuv Great Britain keyboard txheem (uas Raspbian los ua ntej teeb tsa rau) tau ua ntau yam ntawm kuv qhov kev hloov kho txoj haujlwm tiag tiag.

Hloov cov chaw no raws li xav tau, tsim nyog rau koj. Nco ntsoov tias koj yuav tsum tau siv cov xub tuav thiab tus yuam sij tab txhawm rau taug kev hauv 'raspi-config'; thiab tom qab xaiv nws yuav qeeb heev los teb.

Kuv pom nws tsis muaj teeb meem txuas rau internet nrog WiFi-USB dongle (Kuv siv 2 qhov sib txawv). Kuv tsuas yog yuav tsum nkag mus rau kuv li WiFi nkag mus-tus yuam sij-tus lej nkag siv rub tawm hauv qab sab xis ntawm GUI. Thaum kuv tau ua qhov no nws yuav txuas ncaj qha tom qab rov pib dua/lub zog-up.

Tam sim no kuv tau npaj rau kev txhim kho dav dav.

Txhawm rau mus txog qhov no koj tuaj yeem siv ntau txoj hauv kev. Txog rau tam sim no, Kuv tsis tau muab cov ncauj lus zoo ntawm no tab sis muaj ntau txoj hauv kev thiab teeb tsa tau piav qhia ntau dua hauv lub vev xaib. Xws li ib qho rau kev teeb tsa lub taub hau qhov twg koj yuav siv lub qhov rooj ssh davhlau ya nyob twg ntawm koj lub khoos phis tawj ntiag tug los ua cov kauj ruam txhim kho kom tau txais hauv cov lus qhia no.

Kauj Ruam 3: Txhim Kho Ib puag ncig thiab Cov Cuab Yeej

Kev Txhim Kho Ib puag ncig thiab Cov Cuab Yeej
Kev Txhim Kho Ib puag ncig thiab Cov Cuab Yeej
Kev Txhim Kho Ib puag ncig thiab Cov Cuab Yeej
Kev Txhim Kho Ib puag ncig thiab Cov Cuab Yeej

Txog cov txheej txheem teeb tsa teeb tsa thiab software kuv tsim rau txoj haujlwm, Kuv tau ua R&D ntawm Raspberry Pi-2; rau nws muaj plaub-core CPU ua rau nws tshawb nrhiav thiab txhim kho cov cai, nrog ntau lub qhov rais, nrawm dua. Koj tuaj yeem, tau kawg, siv txhua tus qauv Raspberry-Pi kom paub qhov haujlwm no.

Txhawm rau teeb tsa Node.js (kev tshwm sim-tsav I/O server-side JavaScripting txhawb nqa) Kuv tau ua cov hauv qab no …

sudo apt-tau hloov tshiab

sudo apt-tau nruab nodejs npm

Ntxiv cov pob nodeJS no (npm yog Nodejs Tus Thawj Tswj Pob)

npm nruab express

npm nruab socket.io

Cov ntaub ntawv:

www.npmjs.com/package/express Ceev, minimalist web framework

www.npmjs.com/package/socket.io Socket. IO ua kom muaj kev sib tham raws lub sijhawm tiag tiag

Kauj ruam 4: Kho vajtse

Kho vajtse
Kho vajtse
Kho vajtse
Kho vajtse
Kho vajtse
Kho vajtse
Kho vajtse
Kho vajtse

Tus nqi tiv thaiv uas siv tau yog txhua yam sib txawv, vim qhov poob qis thiab ua haujlwm sib txawv rau tag nrho peb ntu LED xim. GPIO Cov qib siab tso tawm tau kwv yees li 3.2 volts. Txhua ntu LED tau raug tshuaj xyuas kom ntseeg tau tias nws siv tsawg dua 20ma qhov siab tshaj thiab kwv yees li 40ma txhua qhov ua ke (<50ma max tso cai tag nrho), uas PiZero tuaj yeem yooj yim lis. Kuv tau txais ntau lub teeb ci ci raws li kuv tuaj yeem ua tau, ncaj qha tsav lub LED; uas txaus rau kuv xav tau. Txhawm rau tsav cov hluav taws xob ntau dua, rau qhov tso zis ntau dua, cov tsav nruab nrab nruab nrab tuaj yeem siv nrog ib qho anode LED nrog nws cov anode txuas nrog rau 5v kab. PS: Raws li kuv ntau yam Dawb qib tau tawm los me ntsis xiav, 27 hloov ntawm 24 Ohm yuav yog qhov kev xaiv zoo dua rau kuv.

Daim ntawv ceeb toom kuv siv lub taub hau nrog txiv neej tus pin, thiab txuas nrog LED ob txhais ceg nrog F-F dhia Qhov no khaws cia qhov siab tag nrho. Kuv soldered cov resisters rau hauv nruab nrab ntawm cov dhia. Siv tsis muaj lub rooj sib tham hauv Circuit Court lossis cov laug cam tsawg dua, nrog rau kev siv lub kaum sab xis micro-USB rau USB adapter rau WiFi dongle, ua qhov kev sib dhos zaum kawg haum me me.

Txog tus diffuser, Kuv pom zoo kom ntaus pob ping-pong (nws yooj yim rau qhov tho qhov loj txaus los ntxig koj 5-8-10 mm LED hauv). Los yog txiav tawm sab saum toj ntawm lub teeb pom kev zoo LED (ib qho uas siv Cov Yas diffuser). Txog qhov cim kab no, nrog lub ntsej muag zoo meej, qhov uas koj xav txiav, thiab siv Dremel zoo li cov cuab yeej nrog cov ntawv txiav txiav nyias. Yog tias koj nyiam, lub iav txiav me me zoo los yog iav haus tuaj yeem siv tau. Thaum koj tau txiav txim siab ntawm ib tus diffuser, lo nws rau saum rooj plaub.

Txog kev ua qauv qhia kuv nyiam siv Li Li lub txhab nyiaj me me tso rau hauv rooj plaub. Chav tsev no zoo li muaj kev cuam tshuam ntau dua wireless. Tau kawg, nws yuav muaj lub sijhawm ua haujlwm tsawg hauv qhov teeb tsa ntawd. Txog rau kev ua haujlwm ib txwm Kuv tsuas siv lub micro-USB phab ntsa adapter.

Kauj ruam 5: Project Software

Qhov Project Software
Qhov Project Software

Kuv siv ob txoj haujlwm, Node.js txheej txheem tham nrog tus menyuam txheej txheem ntawm nws cov ntaub ntawv stdin cov ntaub ntawv.

Nov yog qhov kuv tau ua: Tab sis koj tsis tas yuav, raws li kuv tau muab cov ntaub ntawv tar-gzip uas muaj cov ntawv ua tsob ntoo.

NodeJS server-sab teeb:

cd ~ ib

mkdir node_rgb cd node_rgb mkdir pej xeem

muab 'index.html' thiab 'style.css' tso rau hauv '~/node_rgb/public' directoryput 'rgbDriver.c' thiab 'rgb_main.js' rau hauv '~/node_rgb' directory

Sau/tsim cov txheej txheem c 'rgbDriver':

cd ~/node_rgb

cc -o rgbDriver rgbDriver.c -lwiringPi -lpthread

Rub tawm thiab nthuav dav qhov sib npaug

Txhawm rau rub tawm node_rgb.tgz (hauv qab) rau koj Pi-Zero rau hauv koj phau ntawv qhia tsev (~ pi) koj tuaj yeem ua ib qho ntawm 3 hauv qab no:

  1. Rub tawm los ntawm qhov browser hauv koj Pi-Zero's GUIM tshem cov ntawv mus rau ~ pi/
  2. Hauv lub davhlau ya nyob twg qhov txuas nrog koj Pi-Zero: cd ~ piwget

    mv FZBF9BDIL6VBHKF.tgz rgb_node.tgz

  3. Rub tawm los ntawm qhov browser ntawm koj lub khoos phis tawj desktop. Ua WinSCP luam nws mus rau ~ pi phau ntawv teev npe ntawm Pi-Zero

Tom qab ua tiav #12 lossis 3 saum toj no …

cd ~ ib

tar -xzvf node_rgb.tgz ntoo node_rgb… node_rgb ├── pej xeem │ ├── Dow_Jones_Index.html ├── ├── index.html └── └── style.css ├── rgbDriver ├── rgbDriver.c ├── rgb_main. js ├── start_rgb ├── kill_rgb └── track_dji

Qhov ua tiav ua tiav (los ntawm saum toj no) 'rgbDriver' tuaj yeem siv ntawm nws tus kheej ntawm Node.js interface txheej txheem.

Txhawm rau txheeb xyuas tias tus neeg tsav tsheb no thiab kho vajtse ua haujlwm, pub cov khoom ntawm peb qhov tseem ceeb (ntawm 0-255), cais los ntawm qhov chaw, rau tus neeg tsav tsheb. Zoo li 'ncho 255 0 0 |./rgbDriver 'rau liab lossis' ncha 0 255 0 |./rgbDriver 'rau ntsuab. Nco ntsoov tias "./" qhia OS kom pom peb cov haujlwm 'rgbDriver' hauv cov npe tam sim no. Thaum koj tshaj tawm ^c (cntl-c) kom nres tus tsav tsheb cov coj yuav yog lossis tsis nyob twj ywm. Hloov pauv, koj tuaj yeem sib tham sib pub nws qhov txiaj ntsig. Sim ntaus ntawv, los ntawm kab hais kom ua, cov kab no ib qho dhau ib qho thiab saib cov LED.

./rgbDriver

0 255 0 100 0 100 255 255 0 … thiab … ^c

Nco ntsoov tias koj tsis muaj 2 ntawm cov txheej txheem no ua haujlwm sib luag.

Txhawm rau tso tag nrho cov software thov suite, suav nrog Node.js server siv cov lus txib no:

sudo node rgb_main.js

Tom qab ntawd siv cntl-c thaum koj xav nres Node.js server. Lau nws nrog

sudo node rgb_main.js &

kom nws khiav hauv av tom qab, tab sis tom qab ntawd koj yuav tsum siv 'sudo tua -9 pid' hais kom nres nws. Yog tias cov lus txib no zoo li neeg txawv rau koj, tom qab ntawd tshuaj xyuas qhov ua tiav ntawm cov lus txib no: 'txiv neej tua' & 'txiv neej sudo'.

Siv qhov browser, ntawm koj lub desktop, ntsiav tshuaj lossis xov tooj, uas txuas nrog koj lub network hauv zej zog. Mus rau https:// raspberrypi: 8080/lossis yog tias tsis ua haujlwm siv tus IP chaw nyob ntawm lub cuab yeej (tau los ntawm cmd 'ifconfig') qee yam xws li 192.168.1.15 ntxiv rau qhov chaw nres nkoj tshwj xeeb: 8080 lossis yog tias siv Pi-Zero's GUI: localhost: 8080 yuav ua haujlwm.

Ua haujlwm RGB sliders, ntawm nplooj ntawv uas tshwm los, thiab saib RGB-LED teeb ua raws.

Lwm cov lus txib muaj txiaj ntsig Nco ntsoov tias yog tias koj ua tiav nrog ntau dua ib qho 'rgbDriver' khiav ntawm ib zaug koj yuav muaj peev xwm ua tus cwj pwm tsis tuaj yeem kwv yees tau. Yog tias koj sim thiab sau daim ntawv thib ob ntawm rgb_main.js nws yuav yuam kev tawm.

Cov lus txib no yuav teev tag nrho cov txheej txheem cuam tshuam:

ps aux | grep rgb

Cov lus txib no yuav tua tag nrho cov txheej txheem nodeJS, nrog rau 'rgbDriver' cov txheej txheem menyuam yaus:

sudo ps aux | grep ntawm.*rgb | awk '{print "sudo kill -9" $ 2}' | sh ua

Ua haujlwm ib leeg

Txhawm rau kom Pi-Zero pib Node.js server app thaum nws khau raj… siv koj li kev hloov kho (piv txwv li nano ~/.bash_profile), ntaus kab hauv qab no & tseg rau ~/.bash_profile

cd node_rgb

sudo node rgb_main.js &

Txhawm rau kom tsis txhob tau txais cov lus yuam kev yuam kev thaum qhib lub davhlau ya nyob twg lub qhov rooj siv cov cai codding zoo li cov ntawv sau hauv 'start_rgb' cov ntawv

Thaum Pi-Zero tab tom teeb tsa, tsis muaj keyboard, nas, lossis saib; Graphical User Interface yuav siv sijhawm tsawg CPU, vim yuav tsis muaj kev cuam tshuam nrog cov neeg siv. Kuv tsis cuam tshuam qhov pib GUI pib, raws li Pi-Zero muaj peev txheej ntau dua qhov xav tau, qhov no; thiab kuv nyiam muaj peev xwm txuas ob peb kab thiab siv nws, txhua lub sijhawm yav tom ntej. Txawm li cas los xij, qhov no tsis tsim nyog raws li koj tuaj yeem siv lub davhlau ya nyob twg SSH davhlau ya nyob twg (piv txwv li PuTTY) los ua ib qho kev saib xyuas uas xav tau.

Siv nws ua Tus Saib Xyuas Txheej Txheem

Kuv tsim lub vev xaib txhawm rau saib xyuas kev hloov pauv niaj hnub hauv Dow Jones Index. Nws lub hauv paus tuaj yeem siv ua cov lus qhia rau koj tus kheej nplooj ntawv uas siv qee cov ntaub ntawv hauv web thiab tsav koj li Pi-Zero qhov ntsuas raws li. Nplooj ntawv no tau txais nws (json) cov ntaub ntawv los ntawm Google lub vev xaib. Muaj ntau hom kev pabcuam hauv lub vev xaib, yog li koj yuav tsum tshawb nrhiav qhov uas koj xav siv los txiav txim tus lej JavaScript kom nkag mus tau.

Yog tias koj xav siv koj lub cuab yeej, ib yam li kuv, ua haujlwm tshwj xeeb, sawv ib leeg, Dow Index hloov Qhov Ntsuas tau ntxiv cov kab no mus rau qhov kawg ntawm ~/.bash_profile file, lossis raws li xav tau SSH hauv thiab muab kab lus thib ob. Yog tias tom qab koj xav siv kev tswj chaw taws teeb 'tua -9' qhov tshwm sim epiphany -browser txheej txheem.

loj 20

epiphany-browser -display =: 0.0 localhost: 8080/Dow_Jones_Index.html &

Qhov ntsuas yuav ua kom pom lub teeb grey muab tus nqi 0. Nws dhau los ua ntau dua thiab ntsuab dua nrog cov txiaj ntsig siab dua. Nws yog qhov ci tshaj plaws ntsuab ntsuab ntawm kwv yees li 250. Siab dua qhov tseem ceeb ua rau thaum xub thawj ntsais muag flash, mus txog qhov tob tshaj plaws txog ntawm 500. Rau qhov tsis zoo (niaj hnub poob hauv Dow) nws zoo ib yam, tab sis Liab.

Hloov kho lub Tsib Hlis 2018

Kuv tau tsim nplooj ntawv web tshiab (SolarStorm_devCon.html, txuas ua.txt cov ntaub ntawv, vim yog. Html cov ntaub ntawv tsis rub tawm) uas sau GeoMagnetic cua daj cua dub cov ntaub ntawv (uas tuaj yeem hais txog ntawm kev puas tsuaj CME, EMP) thiab siv qhov ntawd los nthuav tawm xim ntsuas qhov cuam tshuam ntawm Geo-Storm 'DevCon' Index. qhia txog qhov muaj peev xwm ntawm kev puas tsuaj vim yog Electromagnetic pulse (EMP) uas tshwm sim los ntawm huab cua hauv ntiaj teb, suav tias yog lub hnub ci tuaj lossis Coronal huab hwm coj tshem tawm (CME). Siv nws zoo li koj yuav tau siv "Dow_Jones_Index.html".

Kauj Ruam 6: Tswj Lub Vev Xaib Chaw Nyob

Image
Image

Txij ntawm no koj tuaj yeem tswj hwm koj lub teeb IOT xim los ntawm txhua qhov chaw ntawm koj lub network hauv zej zog. Yuav ua li cas kom nws pom thoob plaws hauv is taws nem tsis yog ib feem ntawm cov lus qhia no. Yog tias koj teeb tsa IP pej xeem rau koj lub cuab yeej, ces koj yuav tsum siv tus IP ntawd hauv qhov qhib qhov hais kom ua hauv JavaScript ntawm koj nplooj ntawv (piv txwv li ~/node_rgb/pej xeem/index.html)

Kuv tab tom npaj yuav siv kuv li Pi-Zero IOT ntaus ntawv raws li lub sijhawm qhia xim rau hnub hloov pauv hauv Dow Jones Index. Kuv tsim ib nplooj ntawv uas ua qhov ntawd, uas tau txais json cov ntaub ntawv los ntawm google.com/finance. Kuv ntxiv tsim ob peb nplooj ntawv web los qhia txog ntau yam kev siv rau lub cuab yeej IOT me me no. Tsis yog tso kuv PiZero rau hauv Internet, tuav cov nplooj ntawv ntawm kuv cov pej xeem tam sim no ntsib lub web server (tam sim no @ 71.84.135.81 aka: https://raspi.ddns01.com/ thaum kuv pub dawb Dynamic Domain Name Server tau ua haujlwm), uas tau khiav ntawm tus thawj version B Raspberry-Pi.

Hauv cov cai ntawm kuv nplooj ntawv nyob deb kuv qhib qhov txuas sib txuas rau 192.168.1.41:8080 Kuv tau kho kuv tus Pi-Zero tus ip rau 192.168.1.41. Ua kom zoo ib yam ua raws cov lus qhia ntawm kev teeb tsa-raspberry-pi-nrog-wifi-thiab-a-static-ip nyob hauv qab nqe lus: Static IP Address. So yog tias koj teeb tsa koj PiZero kom nyob ntawm 192.168.1.41 ntawm koj lub network hauv zos, cov nplooj ntawv no, qhib los ntawm kuv lub vev xaib, yuav sib tham nrog koj lub cuab yeej, raws li kev sib txuas tau ua tiav los ntawm cov neeg siv khoom.

Nov yog cov nplooj ntawv uas kuv siv los ntsuas thiab ua haujlwm kuv Pi-Zero IOT teeb pom kev zoo ntaus ntawv. Yog tias koj nqa cov nplooj ntawv no (https://71.84.135.81/iot/rgbLamp/ aka https://raspi.ddns01.com/iot/rgbLamp/ lossis ib qho ntawm cov nplooj ntawv nthuav tawm ntawm nplooj ntawv ntawd) cov neeg siv-sab JavaScript yuav tsav koj lub teeb IOT uas tau tsim (muab nws ua haujlwm ntawm qhov url "192.168.1.41:8080") Yog tias koj nyiam koj tuaj yeem luam qhov chaw ntawm ib ntawm nplooj ntawv ntawd thiab hloov kho rau qhov koj nyiam.

Nrog thawj nplooj ntawv koj tuaj yeem teeb tsa koj lub cuab yeej rau txhua xim. Lub teeb LED thiab cov xim uas koj pom hauv nplooj ntawv web yuav taug qab zoo. Tus nqi tiv thaiv uas siv tau tuaj yeem hloov kho (nrog rau tus saib xyuas) kom tau txais lawv zoo dua qub. Kuv siv sijhawm me me los tsis muaj sijhawm kom ntseeg tau tias lawv sib phim. Nplooj ntawv no yuav hloov kho nws cov xim thaum twg lwm tus hloov xim thiab cov neeg rau zaub mov xa tawm cov lus qhia tshiab.

Ib nplooj ntawv yog lub khawm yooj yim tswj Kev Teeb Teeb.

Muaj nplooj ntawv tsim los taug qab kev sib tw kis las (piv txwv li ncaws pob, ntaus pob, ntaus pob baseball), kev xaiv tsa, lossis tseem yoog rau cov nyiaj nce qib lossis DEFCON ceeb toom qib qhia qib. Cov qhab nias (lossis cog lus pov npav xaiv tsa) tuaj yeem tau txais ncaj qha los ntawm lub vev xaib lossis tshem tawm qee qhov lwm nplooj ntawv web. Kuv tsis muaj qhov pub mis tsis siv neeg tsav kuv nplooj Contest_demo. Ib tus neeg uas muaj txoj kev paub yuav ua li cas ntxiv lub zog tsav tsheb kom khiav lub zog loj LED dej nyab teeb thiab da dej hauv chav (lossis kis las ncaws pob) nrog pab pawg xim thaum lawv ua ntej. Hmoov tsis zoo kuv lig dhau nrog cov lus qhia rau xyoo no cov tais diav loj, tab sis lub sijhawm rau xyoo 2016 kev xaiv tsa.

Tom qab ntawd muaj nplooj ntawv zoo ib yam uas kuv yuav siv tig kuv lub cuab yeej rau hauv Dow Jones taug qab qhov ntsuas. Cov slider thiab cov nyees khawm tsuas yog nyob ntawm DJI nplooj ntawv demo rau ua qauv qhia. Hauv qhov chaw rau nplooj ntawv no muaj cov cai kuv tsim los rov ua xim xim ntsuab-tshuaj ntsuam tshwm sim; nrog cov lus pom txaus uas koj kuj tseem yuav pom nws muaj txiaj ntsig.

Tsuas yog thawj ntawm 4 nplooj ntawv no (nrog rau Pi-Zero raws li index.html nplooj ntawv) mloog rau cov neeg rau zaub mov hloov tshiab lus, thiab ua kom zoo dua qub. Tag nrho cov seem tsuas yog xa mus rau server.

Pom zoo: