Cov txheej txheem:

Sijhawm Koj Tus Neeg Ua Haujlwm Siv SLabs-32: 6 Cov Kauj Ruam
Sijhawm Koj Tus Neeg Ua Haujlwm Siv SLabs-32: 6 Cov Kauj Ruam

Video: Sijhawm Koj Tus Neeg Ua Haujlwm Siv SLabs-32: 6 Cov Kauj Ruam

Video: Sijhawm Koj Tus Neeg Ua Haujlwm Siv SLabs-32: 6 Cov Kauj Ruam
Video: Zoo Siab Nrog Koj - Paj Tsua Thoj [ Official MV ] Nkauj Tawm Tshiab 2022 2024, Hlis ntuj nqeg
Anonim
Sijhawm Koj Tus Neeg Ua Haujlwm Siv SLabs-32
Sijhawm Koj Tus Neeg Ua Haujlwm Siv SLabs-32

Hauv cov lus qhia no, peb yuav ua tus nfc raws cov neeg ua haujlwm ntse hauv/tawm kev tswj hwm uas ua raws koj cov neeg ua haujlwm cov sijhawm ua haujlwm.

Peb tau txais cov ntaub ntawv tam sim no siv NTP (Network Time Protocol) nrog Wi-Fi module (Esp8266) ntawm Slabs-32 thiab xa nws mus rau Atmega328p ntawm I2C npav.

Atmega328p siv lub sijhawm no cov ntaub ntawv los ua cov ntaub ntawv, thaum twg tus neeg ua haujlwm yauv nws yog NFC lossis tawm sab nraud lossis sab hauv lub chaw haujlwm. Tom qab ntawd nws suav lub sijhawm sib txawv ntawm IN lub sijhawm thiab tawm sijhawm thiab nthuav tawm nws ntawm TFT npo ntawm SLabs-32.

Peb tseem tuaj yeem xa cov ntaub ntawv hais txog lub sijhawm siv los ntawm tus neeg ua haujlwm hauv chaw ua haujlwm mus rau google daim ntawv nthuav qhia siv onboard Esp8266 tab sis tsis yog hauv cov lus qhia no. Txoj kev no twb tau ua tiav los ntawm Stephen Borsay (txuas), Kuv tau koom ua ib yam siv daim ntawv thov no.

Txhawm rau kom tau txais koj tus kheej SLabs-32 nyem rau ntawm qhov txuas hauv qab no:

www.fabtolab.com/slabs-32

Kauj Ruam 1: Cov Npe Khoom

Cov Khoom Siv
Cov Khoom Siv

Peb tab tom siv Nfc PN532 module uas yog tus nyeem/sau ntawv NFC module.

Hauv qhov haujlwm no peb xav tau:

  • SLabs-32
  • NFC PN532
  • Jumper Hlau

Kauj Ruam 2: Kev Sib Txuas Kho Vajtse

Kho vajtse sib txuas
Kho vajtse sib txuas

Nfc module tuaj yeem cuam tshuam nrog peb pawg thawj coj txhim kho ntawm I2C, SPI lossis Kev Kub Ceev UART npav, nws yog nyob ntawm peb txiav txim siab. Hauv txoj haujlwm no, peb yuav siv hom SPI.

Ua cov kev sib txuas raws li daim duab qhia chaw muab rau saum toj no thiab koj yuav tsum tsis muaj teeb meem.

  • Vcc → 3.3 V.
  • GND thiab GND
  • SCK thiab PD4
  • MISO → PD3
  • MOSI → PD2
  • SS → PD7

Kauj Ruam 3: Kho NFC PN532

Kho NFC PN532
Kho NFC PN532

NFC PN532 yog NFC nyeem ntawv/sau ntawv qauv. NFC uas sawv cev rau "Kev Sib Txuas Lus Hauv Nroog" yog txheej txheej thev naus laus zis kev sib txuas lus luv luv, uas nws qhov siab txog li 10cm. Nws tau tsim los muab lub teeb yuag thiab kev nyab xeeb kev sib txuas lus ntawm ob lub cuab yeej.

NFC ua haujlwm ntawm 13.56MHz, thiab yog nyob ib puag ncig ib puag ncig "tus pib" thiab "hom phiaj" tus qauv uas tus pib tsim lub tshuab nqus hlau me me uas ua rau lub hom phiaj, txhais tau tias lub hom phiaj tsis xav tau lub zog siv.

Peb tuaj yeem cuam tshuam qhov ntsuas no los ntawm kev siv SPI, I2C lossis HSU (Kev kub ceev UART). Txhawm rau xaiv ib lub tsheb npav tshwj xeeb twg peb siv qhov hloov pauv. Kev teeb tsa los cuam tshuam lawv hauv ib hom tshwj xeeb yog raws li hauv qab no::

  • SPI (0, 1)
  • I2C (1, 0)
  • HSU (0, 0)

Peb yuav siv tsheb npav SPI los cuam tshuam nrog lub ntsuas cua no.

Kauj Ruam 4: Programming SLabs-32

Programming SLabs-32
Programming SLabs-32

Txhawm rau pib nrog SLabs-32 nyem rau ntawm qhov txuas hauv qab no:

startoonlabs.com/Getting%20started%20with%2…

Rub tawm cov kab kos duab txuas rau kauj ruam.

Tom qab rub tawm cov ntawv, qhib daim duab thiab ua cov hauv qab no:

  • Sau koj li ntawv pov thawj Wifi
  • Teem UTC offset raws li koj qhov chaw nyob (Hauv daim duab Esp).

Hauv daim duab no, peb tab tom sib piv UID ntawm Nfc lossis kom paub cov ntaub ntawv hais txog tus neeg ua haujlwm. Txhua tus neeg ua haujlwm tau txais daim ntawv nfc uas muaj qhov tshwj xeeb UID. Txog kev ua qauv qhia lub hom phiaj no qhia ua piv txwv ntawm kev tswj hwm ib tus neeg ua haujlwm cov sijhawm ua haujlwm li cas. Koj tseem tuaj yeem ntxiv ntau tus neeg ua haujlwm hauv koj daim duab yog tias koj xav tau.

Kauj ruam 5: Siv Google Ntawv

Raws li tau hais ua ntej uas peb tseem tab tom hloov kho lub sijhawm siv los ntawm cov neeg ua haujlwm mus rau nplooj ntawv google. Txhawm rau kawm paub yuav ua li cas ua raws cov kauj ruam tau muab los ntawm qhov txuas no.

Hloov chaw ntawm kev siv Gscrpit muab hauv qhov kev qhia ntawd, siv Gscript txuas nrog rau theem no.

Kauj Ruam 6: Pib Sijhawm

Pib Sijhawm
Pib Sijhawm

Qhov ntawd zoo nkauj heev. IoT cov haujlwm tau yooj yim los ntawm SLabs-32.

Txoj haujlwm no tsis yog tsuas yog tswj hwm cov neeg ua haujlwm tab sis koj tseem tuaj yeem siv nws rau lwm daim ntawv thov. Kuv yuav tso qhov ntawd mus rau koj lub tswv yim.

Nco ntsoov ua raws peb kom yooj yim dua thiab nrawm IoT cov haujlwm siv SLabs-32

Pom zoo: