Cov txheej txheem:

Tes-Free Tokens: 15 Kauj Ruam (nrog Duab)
Tes-Free Tokens: 15 Kauj Ruam (nrog Duab)

Video: Tes-Free Tokens: 15 Kauj Ruam (nrog Duab)

Video: Tes-Free Tokens: 15 Kauj Ruam (nrog Duab)
Video: Tik Tok || Tseem Nco Koj Thiab Kuv P15 2024, Hlis ntuj nqeg
Anonim
Hands-free Tokens
Hands-free Tokens

Hlo Geeks, Tam sim no kuv tab tom kawm hauv +2 uas yog sib npaug rau qib 12. Kuv txaus siab heev hauv computer science thiab kuv lub ntsiab lus tseem ceeb yog qhov ntawd. Kuv siv sijhawm ntau hauv kev tsim cov phiaj xwm Embedded. Kuv muaj kwv yees li 3 xyoos ntawm kev paub hauv thaj chaw kos. Kuv ib txwm tsom mus rau qhov tshiab thiab ntau yam kev daws teeb meem. Kuv niam thiab txiv tau muab kev txhawb nqa loj rau kuv los ua qhov haujlwm no.

Lub ntsiab lus tseem ceeb ntawm kev sib tw yog tsim kom muaj tes dawb daws teeb meem.

Ntawm no kuv tab tom tsim cov cuab yeej hu ua QMN (Queue Management Node) uas tuaj yeem tsim lub cim token thiab yog li nws tuaj yeem tswj hwm cov kab ke virtual.

Hauv qee qhov kab, peb yuav tsum tau txais lub cim tokens ntawm lub txee uas tej zaum yuav ua rau koj muaj kev phom sij. Yog li los ntawm kev siv lub cim tokens virtual no koj tuaj yeem zam qhov kev phom sij ntawd. Koj tau txais tiag tiag tokens virtual ntawm koj lub smartphone. Lub token yog tsis muaj tes kiag li.

Nws yog qhov yooj yim siv-phooj ywg virtual queue txiag tsim los ntawm Arduino MKR WiFI 1010.

Kauj ruam 1: Demo Video

Image
Image

Saib cov vis dis aus kom paub txog nws.

Kauj Ruam 2: Yam Peb Xav Tau

Cov khoom siv kho vajtse

  • Arduino MKR WiFi 1010 x 1
  • Push Button Module x 1
  • TM1637 4 Khoom Digital Tube LED Display Module x 1
  • Jumpers x 1

Cov khoom siv software

  • Arduino IDE Cov
  • Twilio SMS API
  • ThingSpeak API

Cov cuab yeej

  • Hlau Stripper & Cutter x 1
  • Soldering Hlau x 1
  • Cov tub rog x 1

Kauj Ruam 3: Nws Ua Haujlwm Li Cas?

Neeg siv interface
Neeg siv interface

Queue Management Node (QMN) yog lub cuab yeej uas tsim cov ntse tokens. Txhawm rau tsim cov ntse tokens, tus neeg yuav tsum nyob hauv wifi ntau ntawm Arduino MKR 1010. Tus neeg kuj xav tau lub xov tooj smartphone kom ua tiav cov txheej txheem. Kev ua haujlwm yuav mus raws li hauv qab no…

  • Ib qhov chaw nkag WI-FI yuav tsim los ntawm Arduino MKR 1010.
  • Tus neeg uas xav tau tus cim yuav tsum txuas lub xov tooj mus rau qhov chaw nkag & qhov ntawd yuav raug xa rov mus rau qhov chaw nyob.
  • Hauv nplooj ntawv ntawd, tus neeg yuav tsum sau nws tus lej xov tooj. Lub sijhawm ntawd, OTP yuav raug xa mus rau tus lej txhawj xeeb txhawm rau txheeb xyuas nws. Tus xov tooj yog txhob txwm txhob txwm tshaj tawm.
  • Tom qab txheeb xyuas tus lej xov tooj, tus cim npe yuav tshwm rau ntawm tus tswv hauv zos.
  • Thaum nws tig los lub cuab yeej (QMN) yuav xa lus ceeb toom rau tus neeg muaj kev txhawj xeeb kom coj lawv mus.

Cov cuab yeej no tau txais qhov kev thov los ntawm tib neeg thiab muab lawv cov ntse tokens. Txog kev xa xov peb siv Twilio SMS API hauv QMN ntaus ntawv. Kev ceeb toom ntawm Turn tuaj yeem xa los ntawm nias lub pob hauv QMN.

Thaum tag nrho cov tokens raug hu tawm, koj tuaj yeem tshem lub cim xeeb los ntawm nias lub pob pib dua ntawm Arduino MKR WiFi 1010.

Kauj Ruam 4: Tus Neeg Siv Khoom Siv

Neeg siv interface
Neeg siv interface
Neeg siv interface
Neeg siv interface

*) Thaum koj txuas nrog Access point, koj yuav raug xa mus rau nplooj ntawv zoo li thawj qhov.

*) Tom qab xa tus lej xov tooj, koj yuav tau txais tus lej OTP ntawm tus lej ntawd. Tom qab ntawd nws qhia rau nplooj ntawv OTP kom nkag mus rau koj tus lej OTP.

*) Thaum koj xa OTP raug, koj yuav tau txais cov cim ntawm nplooj ntawv cim npe no.

*) Yog tias koj nkag mus rau OTP tsis raug, nws yuav qhia tsis raug OTP.

*) Yog tias koj tus lej tau txais lub cim cim lawm, nws yuav qhia koj tias koj twb sau npe lawm.

Qhov ntawd yog txhua yam hais txog Tus Neeg Siv Khoom Siv.

Kuv tsis paub ntau txog HTML. Kuv Txiv tau ua cov nplooj ntawv no zoo dua los ntawm kev siv CSS.

Kauj Ruam 5: Siv Cov Ntaub Ntawv & Qhov Zoo

Nws tuaj yeem siv tau nyob txhua qhov chaw xws li Tsev Kho Mob, Khw thiab Tsev So.

Zoo

  • Tsis muaj internet txuas xav tau kom tau txais tokens
  • Ib qho yooj yim siv-phooj ywg web interface.
  • Kev ceeb toom ntaus ntawv ib txwm, thaum tig los.
  • Tsis muaj tokens lub cev.
  • Yooj yim rau siv.
  • Tsis muaj sijhawm tos tsis tseem ceeb, tshwm sim thaum koj tig los.

Kauj Ruam 6: Arduino MKR WiFi 1010

Arduino MKR WiFi 1010
Arduino MKR WiFi 1010
Arduino MKR WiFi 1010
Arduino MKR WiFi 1010

Lub paj hlwb ntawm lub cuab yeej yog Arduino MKR WiFi 1010. Nws yog qhov yooj yim tshaj plaws ntawm kev nkag mus rau theem pib IoT thiab pico-network daim ntawv thov tsim. Lub Rooj Tswjhwm Saib lub hauv paus tseem ceeb yog lub zog qis Arm® Cortex®-M0 32-ntsis SAMD21, zoo li hauv lwm cov laug cam hauv Arduino MKR tsev neeg. Kev sib txuas ntawm WiFi thiab Bluetooth® tau ua tiav nrog tus qauv los ntawm u-blox, NINA-W10.

Cov cuab yeej no vam khom kev sib txuas ntawm WiFi ntawm Arduino MKR WiFi 1010. Cov cuab yeej siv ob hom AP (Acces Point) hom thiab STA (Chaw Nres Tsheb) hom ntawm wifi module. Cov cuab yeej yuav ntse hloov ntawm cov qauv no rau kev ua haujlwm kom raug ntawm lub cuab yeej no.

Kauj Ruam 7: Arduino IDE

Arduino IDE Cov
Arduino IDE Cov

Arduino IDE tau siv ntawm no rau kev ua haujlwm ntawm Arduino MKR WiFI 1010. Thov ua tib zoo saib ntawm no kom pib nrog lub cuab yeej. Siv qhov tseeb Arduino IDE rau kev ua haujlwm ntawm Arduino MKR wifi 1010. Ua ntej yuav nkag mus rau hauv kev tshuaj xyuas yog tias muaj ib qho tshiab tshaj tawm firmware hloov tshiab rau lub cuab yeej. Thov saib ntawm no kom paub yuav hloov kho lub firmware li cas.

Kauj Ruam 8: Chaw Nkag Nkag Nkag

Peb tab tom tsim qhov nkag mus (AP) los ntawm Arduino MKR WiFI 1010, txhua lub cuab yeej (txawb) tuaj yeem txuas nrog AP no. Txhawm rau nkag mus rau lub vev xaib sib tham yav dhau los, ib tus neeg xav tau ntaus tus IP chaw nyob lossis lub npe host hauv qhov browser. Qhov ntawd yuav luag zoo, tab sis tus neeg siv yuav tsum tau muab tus IP lossis tus tswv lub npe tso rau ntawm qhov browser. Qhov ntawd yog qhov txawv heev. Tab sis qhov no, lub cuab yeej uas txuas rau QMN yuav raug xa rov mus rau lub vev xaib sib tham ntawm Captive Portal. Ntawm no Captive Portal ua lub luag haujlwm tseem ceeb hauv kev txo kev siv zog ntawm cov neeg siv. Muaj ntau qhov Kev Nkag Nkag Nkag Nkag Rau Portal nrog Espressif cov cuab yeej, hmoov tsis muaj nrog NINA lub tsev qiv ntawv. Vim tias MKR WiFi 1010 siv NINA lub tsev qiv ntawv. Thaum kawg, Kuv pom ib txoj haujlwm hauv Arduino hub uas siv Captive Portal ua yam tseem ceeb los ntawm JayV Tom qab ntawd kuv pib kuv txoj haujlwm los ntawm kev coj nws ua tus lej cim. Nws yuav luag ua haujlwm zoo.

Qhov peb tab tom ua tiag tiag yog qhov peb tab tom teeb DNS thiab los ua tus tswv Access Point (AP) - IP chaw nyob thiab tshawb xyuas thawj (16) DNS thov ntawm UDP chaw nres nkoj 53. Tom qab txheeb xyuas thawj 16 qhov kev thov peb yuav xa cov lus teb rau DNS thov nrog qhov hloov pauv tus IP chaw nyob ntawm tus kheej Access Point. Tom qab ntawd lub xov tooj yuav cia li thauj lub web interface los ntawm lub vev xaib. Cov txiaj ntsig kawg yuav zoo li qhov no thaum lub cuab yeej txuas nrog AP tshwj xeeb, lub xov tooj yuav cia li thauj lub vev xaib sib txuas. UDP server thiab Webserver ua haujlwm ob qho tib lub sijhawm. Lub web server yog nplooj ntawv yooj yim yooj yim nrog rau daim ntawv khawm nkag mus rau tus lej xov tooj.

Kauj Ruam 9: Twilio & Yam Hais Lus

Twilio & Yam Hais Lus
Twilio & Yam Hais Lus
Twilio & Yam Hais Lus
Twilio & Yam Hais Lus

Hmoov tsis zoo, kuv tsis muaj GSM module xa cov lus. Txhawm rau xa OTP thiab kev ceeb toom ntaus ntawv peb yuav tsum siv ib qho SMS API. Yog li hauv txoj haujlwm no, Kuv siv Twilio's SMS API kom ua tiav txoj haujlwm. Raws li peb paub tias, kom API ua haujlwm peb yuav tsum tau muab HTTP thov rau tus neeg rau zaub mov. Ua ntej kuv muab qhov kev thov HTTP ib txwm tsis muaj encryption rau Twilio, tab sis Twilio tsis xav txog kuv qhov kev thov. Lawv xav tau SSL cov ntiv tes kom ntseeg tau kev nyab xeeb. Kuv tsis tau pom ib qho haujlwm hauv NINA cov tsev qiv ntawv uas txhawb nqa cov SSL no. Yog li kuv siv Thingsspeak los ua rau Twilio. Txhawm rau siv cov kev pabcuam no koj yuav tsum sau npe hauv ob lub platform.

Hauv Twilio tsim tus lej tshiab thiab qhov ntawd yuav yog tus lej uas koj xa cov ntaub ntawv. Koj yuav tau txais credit dawb hauv Twilio rau kev xa xov. Txog rau tus lej sim, koj yuav tsum txheeb xyuas tus lej uas koj xav xa cov ntaub ntawv.

Mus rau Thingspeak.com, nyem rau ntawm cov apps, tom qab ntawd ThingHTTP, thiab tom qab ntawd tshiab ThingHTTP. Qhov no yuav coj koj mus rau nplooj ntawv teeb tsa. Koj yuav tsum pom koj tus lej Twilio SID thiab tus lej cim ntawm koj Twilio dashboard nplooj ntawv.

  • Npe nws Twilio Xa SMS
  • URL yog https://api.twilio.com/2010-04-01/Accounts/YOUR TWILIO ACCOUNT SID/SMS/Messages
  • HTTP Auth Username yog KOJ TWILIO ACCOUNT SID
  • HTTP Auth Password yog koj li TWILIO AUTH TOKEN
  • Teem txoj hauv kev rau POST
  • Cov ntsiab lus-hom yog daim ntawv thov/x-www-form-urlencoded
  • Nyem tshem lub taub hau, thiab tso tus tswv tsev tseg
  • Lub Cev = Los Ntawm = Koj Tus lej TWILIO & Rau = %% tus lej %% & Lub Cev = %% lus %%

Nyem Txuag ThingHTTP. Qhov tseem ceeb API ntawm ThingHTTp yuav tsum suav nrog hauv Arduino Sketch.

Kauj Ruam 10: AP lossis STA Hom

Txhua Arduino cov laug cam uas muaj Nina module ua ib lub luag haujlwm piv txwv li hom chaw nres tsheb lossis hom Nkag Nkag Nkag. Peb yuav tsum hloov tas li ntawm cov qauv no kom ua tiav txoj haujlwm. Ua ntej, QMN yuav nyob hauv AP hom tom qab tau txais tus lej nws yuav hloov mus rau STA hom rau xa OTP. Tom qab xa OTP tus QMN yuav hloov rov mus rau AP hom. Yog tias ib tus neeg ua rau lub laub khawm, QMN yuav hloov mus rau STA hom rau muab SMS ceeb toom. Tom qab ntawd, nws yuav rov qab los rau AP hom. Txog rau muab internet txuas peb tab tom hloov QMN rau STA hom. SMS API xav tau kev sib txuas hauv is taws nem.

Kauj Ruam 11: TM1637 4 Khoom Digital Tube LED Zaub & Laub Khawm

TM1637 4 Khoom Digital Tube LED Zaub & Laub Khawm
TM1637 4 Khoom Digital Tube LED Zaub & Laub Khawm
TM1637 4 Khoom Digital Tube LED Zaub & Laub Khawm
TM1637 4 Khoom Digital Tube LED Zaub & Laub Khawm

TM1637 4 Bits Digital Tube LED Display Module yog qhov kev daws teeb meem rau kev nthuav tawm cov ntaub ntawv tso tawm ntawm koj li haujlwm. Txawm hais tias cov ntaub ntawv tso tawm raug txwv los ntawm tus lej tseem nws tso cai rau cov neeg siv los tso qee cov cim ib yam li A, B, C thiab lwm yam. Qhov 7 ntu LED Dsiplay no muaj 4 tus lej uas yog tswj los ntawm TM1637 Tsav Tsheb Chip. Nws xav tau tsuas yog ob txoj kev sib txuas los tswj qhov no TM1637 4 Khoom Digital Tube LED Display Module. Los ntawm kev saib ntawm cov zaub no ib tus tuaj yeem nkag siab yooj yim tus lej Token. Qhov ntawd yog qhov siv tiag ntawm lub cuab yeej no.

Koj xav tau lub tsev qiv ntawv hu ua TM1637Display.h rau kev ua haujlwm nrog cov qauv no. Tsuas yog rub lub tsev qiv ntawv los ntawm no.

Ntawm no laub khawm yog siv rau hu rau tokens. Kuv tau siv lub laub khawm khawm kom nws yooj yim heev rau kev sib xyaw. Ntawm no khawm laub yog nyob rau hauv rub tawm hom. Koj tseem tuaj yeem yooj yim ua tus qauv nrog tus tiv thaiv thiab khawm laub.

Kauj ruam 12: Circuit Court

Circuit Court
Circuit Court
Circuit Court
Circuit Court

Lub Circuit Court yog qhov yooj yim heev, nws tsis suav nrog cov khoom siv nyuaj. Tsuas yog txuas raws li qhov schematics. Ua ntej kuv tau ua lub Circuit Court ntawm daim ntawv qhia zaub mov. Tom qab ntawd kuv txuas nrog cov dhia.

Kauj Ruam 13: Case

Case
Case
Case
Case
Case
Case

Kuv tau txais cov ntaub ntawv no los ntawm lub khw hauv ib cheeb tsam. Kuv tsuas yog txiav ib daim me me nyob rau sab xub ntiag rau qhia xya ntu coj los qhia tus cim. Kuv kuj tau ntuag ob daim los ntawm sab, ib qho yog rau lub laub khawm thiab lwm qhov yog rau USB cable. Txhawm rau muab lub zog rau Node. Cov ntaub ntawv no zoo heev, Txhua lub Cheebtsam tau muab tso zoo heev.

Kauj ruam 14: Arduino Sketch

Txhua nplooj ntawv HTML pom hauv lub interface tau khaws cia hauv lub cim xeeb nco ntawm Arduino MKR WiFi 1010. Rau kev khaws cia uas kuv tau siv PROGMEM cov khoom siv.

PROGMEM yog ib feem ntawm pgmspace.h lub tsev qiv ntawv. Nws tau suav nrog hauv cov ntawv niaj hnub ntawm IDE. Txawm li cas los xij, yog tias koj siv IDE version qis dua 1.0 (2011), koj yuav tsum xub suav nrog lub tsev qiv ntawv nyob rau saum koj daim duab, zoo li no:

#suav nrog

Thaum PROGMEM tuaj yeem siv rau ntawm qhov sib txawv ib leeg, nws tsuas yog tsim nyog qhov tsis meej pem yog tias koj muaj cov ntaub ntawv loj dua uas xav tau khaws cia, uas feem ntau yog yooj yim hauv kab. Peb muaj cov ntaub ntawv loj nyob ntawm no yog li peb mus rau qhov no.

Txhua cov ntaub ntawv HTML tau khaws cia hauv "source.h" tab. Tag nrho cov cai rau txoj haujlwm no tuaj yeem pom ntawm no. Tsuas yog xa cov cai no rau hauv Arduino ntaus ntawv.

Kauj Ruam 15: QMN

QMN tau
QMN tau

Lub zeem muag zaum kawg ntawm lub cuab yeej. Lub cuab yeej npaj siv. Tsuas yog siv nws nrog USB cable thiab txaus siab rau!

Duab
Duab
Duab
Duab

Khiav Hauv Qhov "Tsis tuaj yeem kov Qhov no" Kev Sib Tw Tsev Neeg

Pom zoo: