Cov txheej txheem:
- Kauj Ruam 1: Sau Cov Khoom
- Kauj Ruam 2: Siv Potentiometer los Kho RGB LED
- Kauj Ruam 3: Sib koom NFC
- Kauj Ruam 4: Tau Txais Kev Hloov Kho
Video: Txuag thiab Rov Ua Haujlwm Qhov Tseem Ceeb Nrog NFC (TfCD): 4 Cov Kauj Ruam
2024 Tus sau: John Day | [email protected]. Kawg hloov kho: 2024-01-30 09:27
Peb xav sim seb nws ua haujlwm li cas txhawm rau kho qee qhov txiaj ntsig lossis teeb tsa thiab tom qab rov nco qab qhov teeb tsa no. Txog qhov kev sim no peb tau siv NFC lossis nyeem thiab tom qab ntawd khaws tus nqi ntawm nws. Tom qab ntawv tuaj yeem rov luam dua thiab xa tus nqi rov qab los kho qee qhov chaw. Txhawm rau ua kom muaj kev cuam tshuam peb tau siv Arduino Uno ua tus tswj thiab RGB LED lub nplhaib ua qhov hloov pauv. Nrog lub hwj chim potentiometer RGB hue tuaj yeem teeb tsa. Kev sib txuas lus ntawm Arduino thiab NFC lossis tau teeb tsa nrog daim npog NFC.
(Txoj haujlwm no yog kev tawm dag zog rau TU Delft, Kev Tsim Khoom Tsim Khoom, chav kawm: TfCD)
Kauj Ruam 1: Sau Cov Khoom
Peb siv rau txoj haujlwm no cov ntaub ntawv hauv qab no:
- Arduino uno- NFC shield & tag (https://www.elecrow.com/wiki/index.php?title=NFC_Shield)- Mokugi t-WS2812B-8LED- Potentiometer (10 3B 42 5V)- Hloov -10K Ohm resistor - (Daim ntawv qhia zaub mov)
Kauj Ruam 2: Siv Potentiometer los Kho RGB LED
Ua ntej kom paub tseeb tias LED koj tab tom ua haujlwm nrog kev ua haujlwm, los ntawm kev siv lwm qhov kev ntsuas tus lej. Koj tuaj yeem txuas lub hwj chim ntsuas kom kho RGB ntawm LED. Rau qhov no tsim lub Circuit Court raws li qhia hauv daim duab. Txuas mus rau lub zog (5V) thiab hauv av, thiab txuas lub zog hluav taws xob rau tus pin A0.
Yog tias koj xav ntsuas tus qauv thiab tom qab txuag ntau qhov sib txawv koj tuaj yeem siv ntau lub zog ntxiv ntawm cov kauj ruam no.
Cov cai rau qhov kev xeem no kuj tau txuas nrog. Txhawm rau kom tau txais txoj cai ua haujlwm koj yuav tsum rub lub tsev qiv ntawv Adafruit_NeoPixel.h.
Peb sib xyaw cov xim ntawm RGB LED raws li hauv qab no: Peb tau xaiv tas li kom muaj xim liab thiab kho nws kom ntshav los ntawm kev sib xyaw xim xiav. peb daim ntawv qhia kev nyeem ntawv ntawm lub ntsuas cua:
void ReadPot () {val = analogRead (lauj kaub); val = daim ntawv qhia (val, 0, 1023, 0, 255);
Txhawm rau zam kom tsis txhob ploj ntawm cov tswv yim tus nqi ntawm lub zog, peb tsuas yog hloov tus nqi tshiab ntawm xiav LED, thaum qhov sib txawv ntawm qhov tam sim no thiab yav dhau los potvalue siab txaus:
int diff = abs (val-oldVal);
if (diff> TOLERANCE) {ChangeLED ();
Kauj Ruam 3: Sib koom NFC
Cov kauj ruam tom ntej yog ua ke NFC. Ua ntej txuas NFC daim thaiv rau Arduino.
Kuj ntxiv qhov hloov pauv raws li qhia hauv cov duab. Qhov hloov pauv tau siv los hloov pauv ntawm kev nyeem ntawv thiab sau ntawv mus rau NFC lossis.
Rub lub tsev qiv ntawv PN532.h rau daim npog NFC. Cov lej txuas nrog yog kev hloov pauv ntawm cov piv txwv piv txwv muab hauv lub tsev qiv ntawv. Nws tau hloov pauv txoj hauv kev uas RGB tus nqi ntawm LED tau hloov pauv.
Koj kuj tseem tuaj yeem kuaj thawj zaug tsuas yog nyeem lossis sau ntawv nrog ob tus lej uas tau muab cais cais.
Piav qhia zaum kawg
Ua ntej txhua qhov siv tau hloov pauv tau pib.
Tom qab ntawd hauv qhov tsis muaj teeb tsa kev sib txuas nfc tau teeb tsa.
Lub voj void pib nrog nyeem lub xeev ntawm qhov hloov.
Case 0 yog thaum lub xeev khawm yog HIGH. Hauv qhov no thawj qhov ua haujlwm Nyeem Ntawv () hu ua. Qhov no nyeem RGB tus nqi tau txais kev cawmdim hauv ntu 8 ntawm NFC tag ntawm thawj qhov chaw ntawm kab ntawv (Blue = block [0];). Tom qab ntawd ua haujlwm ChangeLEDRead () yog hu ua, uas hloov qhov hue ntawm LED rau tus nqi, uas nyuam qhuav nyeem los ntawm NFC lossis.
Case 1 yog thaum lub xeev khawm yog LOW. Hauv qhov no ua ntej ua haujlwm ReadPot () yog hu ua, uas txhais tau tias tam sim no koj tuaj yeem tuaj yeem kho tus hue ntawm LEDs nrog lub hwj chim. Cov tswv yim no los ntawm lub ntsuas hluav taws xob yog tom qab ntawd teeb tsa tus nqi nruab nrab ntawm 0 thiab 255. Kev ua haujlwm ChangeLEDPot () tom qab ntawd tswj cov xim LED siv cov tswv yim los ntawm lub ntsuas hluav taws xob. Hauv qhov no kuj tseem muaj nuj nqi Sau () hu ua. Qhov no ua kom ntseeg tau tias sai li sai tau thaum NFC tag tau muab tso ze rau ntawm daim ntaub thaiv tam sim no tus nqi ntawm xiav yuav raug sau rau ntawm nws hauv thawj qhov chaw ntawm thaiv 8.
Kauj Ruam 4: Tau Txais Kev Hloov Kho
Tib txoj cai kuj tseem tuaj yeem siv rau lwm qhov xwm txheej thiab tsis tsuas yog txwv rau NFC.
Xav txog piv txwv txog qhov chaw ua haujlwm sib koom, qhov uas koj kho qhov siab ntawm koj lub rooj zaum, lub nraub qaum thiab lub siab ntawm lub rooj rau koj tus kheej nyiam. Koj txuag koj qhov kev nyiam los ntawm kev tshuaj xyuas sai nrog NFC lossis. Thaum koj rov qab los lwm hnub koj luam koj daim ntawv ntxiv, thiab qhov chaw ua haujlwm hloov pauv rau koj qhov chaw.
Hloov chaw ntawm NFC nti, koj tseem tuaj yeem siv koj lub xov tooj smartphone. Ib daim ntawv thov tshwj xeeb lossis lub vev xaib tuaj yeem siv ua interface.
Lwm qhov kev siv yuav yog piv txwv los luam theej duab cov ntiv tes es tsis txhob luam NFC lossis. Cov ntiv tes tuaj yeem txuas nrog rau qee tus neeg siv profile uas nyiam tau txais kev cawmdim.
Pom zoo:
Yuav Ua Li Cas Nyeem Ntau Qhov Analog Qhov Tseem Ceeb Siv Ib Tus Pin Pin: 6 Kauj Ruam (nrog Duab)
Yuav Ua Li Cas Nyeem Ntau Qhov Analog Tus Nqi Siv Ib Tus Pin Pin: Hauv qhov kev qhia no, kuv yuav qhia koj yuav ua li cas nyeem ntau yam sib piv qhov txiaj ntsig siv tsuas yog ib tus lej nkag nkag
Kawm Ntawm No Txog Qhov Tseem Ceeb Tseem Ceeb!: 11 Kauj Ruam
Kawm Ntawm No Txog Ntawm Qhov Tseem Ceeb Tseem Ceeb!: Koj tuaj yeem paub dab tsi txog qib dej hauv lub taub dej? Txhawm rau saib xyuas yam khoom no, koj tuaj yeem siv lub ntsuas siab. Qhov no yog cov cuab yeej muaj txiaj ntsig zoo rau kev lag luam automation, feem ntau. Hnub no, peb tab tom tham txog tsev neeg tseeb ntawm MPX
Txuag lub Ntiaj Teb thiab Koj Lub Hnab. $$ Hloov Koj P & S Pheej Yig Pheej Yig Lub Koob Yees Duab kom rov them rov qab: 4 Cov Kauj Ruam (nrog Duab)
Txuag lub Ntiaj Teb thiab Koj Lub Hnab. $$ Hloov Koj Li P & S Pheej Yig Tshaj Lub Koob Yees Duab kom rov tau txais txiaj ntsig: Ntau xyoo dhau los, Kuv yuav Dolphin Jazz 2.0 Megapixel Digital Camera Nws muaj cov yam ntxwv zoo thiab tus nqi. Nws kuj tseem muaj qhov qab los noj mov rau AAA Bateries. Tsis yog ib tus neeg taug kev deb ntawm qhov kev sib tw, kuv xav tias kuv yuav hloov kho nws kom siv lub roj teeb rov tau los kom tsis txhob nkim sijhawm ntxiv
Rov siv lub koob yees duab pov tseg thiab txuag lub Ntiaj Teb! thiab Txuag Ib Qhov Tseeb: 4 Kauj Ruam
Rov siv lub koob yees duab pov tseg thiab txuag lub Ntiaj Teb! thiab Txuag Qhov Tseeb Tseeb: Tsis ntev los no kuv tau poob kuv lub khw muag duab hauv zos (jessops) kom tau txais ob peb lub koob yees duab uas siv tau pov tseg raws li kuv paub tseeb tias koj tau paub tias lawv ua kev lom zem zoo rau cov neeg poob siab. Tsuas yog nug thiab lawv muab 'em tam sim ntawd. Kuv tseem xav, huh, cov tuam txhab no tau txais lub koob yees duab rov qab, muab
Kuv Qhov Kaum Yam Tseem Ceeb Tshaj Plaws Cov Lus Qhia thiab cov lus qhia: 9 Kauj Ruam (nrog Duab)
Kuv Top Ten Qhov Siv Tau Zoo Tshaj Plaws Cov Lus Qhia thiab Cov Lus Qhia: Muaj 6 ntiv tes los daus hauv av, thiab koj tau koom nrog hauv tsev. Koj tau poob ib ntus koj qhov kev mob siab rau ua haujlwm ntawm koj li GPS-coj ua hlau txiav laser. Tsis tau muaj ib qhov haujlwm tshiab ntawm koj qhov chaw koj nyiam uas tau ua rau koj nyiam