Cov txheej txheem:

ME_TIME: 6 Kauj Ruam
ME_TIME: 6 Kauj Ruam

Video: ME_TIME: 6 Kauj Ruam

Video: ME_TIME: 6 Kauj Ruam
Video: P!nk, Willow Sage Hart - Cover Me In Sunshine (Lyrics) 2024, Lub Xya hli ntuj
Anonim
ME_TIME
ME_TIME

Qee zaum ib lossis ob vib nas this tuaj yeem cawm tib neeg txoj sia. Txhua txhua hnub, muaj xwm txheej tshwm sim thiab Me_Time tau tsim los txhawm rau ua kom muaj txiaj ntsig zoo ntawm kev kho mob.

Me_Time yog cov kab ke uas sib qhia cov ntaub ntawv kho mob tam sim nrog tsev kho mob cov neeg ua haujlwm kom tuaj koom tus neeg mob thaum muaj xwm txheej lossis xwm txheej ceev.

Nws suav nrog ob lub cuab yeej uas cuam tshuam thaum lawv nyob ze: Kuv thiab Sijhawm.

Kuv yog lub cim xeeb cim teeb tsa rau cov pej xeem hauv caj dab thiab muaj cov ntaub ntawv kho mob tus kheej.

Lub sijhawm yog cov cuab yeej lector tso rau hauv kws kho mob, pab lossis tus saib xyuas mob caj dab. Nws tso cai rau lawv nyeem cov ntaub ntawv ntawm Kuv thiab qhia nws los ntawm lub vijtsam hauv daim tawv nqaij.

Yog li ntawd, cov txheej txheem no tuaj yeem pab cov neeg mob hauv txhua qhov xwm txheej, tshwj xeeb, yog tias lawv tau raug kev txom nyem thiab raug xwm txheej thiab tsis tuaj yeem nthuav qhia lawv tus kheej.

Vim tias vib nas this tseem ceeb. Vim tias lub neej tseem ceeb. Vim yog kuv lub sijhawm. Ib thib ob, ib lub neej.

Kauj ruam 1: QHOV TSEEB

Cov ntaub ntawv

  • Arduino 1
  • Cov qhob cij
  • Hlau
  • Potentiometer
  • Zaub LCD 16x2
  • Kuj 220
  • RFID RC522 KIT (lector+ daim npav+ tus lej tseem ceeb)
  • Cov khoom siv hluav taws xob (3.3V thiab 5V)
  • Lub hauv paus
  • Plaster bandage
  • Dej
  • Dawb putty hmoov
  • Lub tais
  • Ntoo sawb los yog diav
  • Ntawv xeb
  • Tshuaj tsuag dub

PROGRAMS

Arduino IDE Cov

Kauj Ruam 2: CIRCUIT

CIRCUIT
CIRCUIT

Hauv ntu no tau nthuav tawm lub Circuit Court uas yuav tsum tau ntsaws raws li tau qhia hauv daim duab.

Cov ntsiab lus tseem ceeb:

Tus lector ntawm cov khoom siv RFID RC522 yuav tsum txuas nrog GND, 3, 3 V thiab cov koob digital.

Cov zaub LCD 16x2 yuav tsum txuas nrog GND, 5 V, digital pins thiab potentiometer.

Lub ntsuas hluav taws xob yuav tsum txuas nrog GND, 5V thiab tso saib LCD 16x2.

Kauj ruam 3: CODE

Hauv theem no tau nthuav tawm thiab piav qhia cov cai ntawm ME_TIME. Txoj cai pab sau npe rau daim npav lossis cov saw tseem ceeb, teeb tsa lub vijtsam thiab sau cov ntaub ntawv kho mob. Nws yog tsim nrog software Arduino IDE.

#suav nrog // suav nrog tsev qiv ntawv#suav nrog

#suav nrog

#define RST_PIN 9 // lub ntsiab lus ntawm tus pin ntawm qhov chaw nws nyob

#define SS_PIN 10

MFRC522 mfrc522 (SS_PIN, RST_PIN); // tsim MFRC522 piv txwv

LiquidCrystal lcd (7, 6, 5, 4, 3, 2); // tsim LiquidCrystal piv txwv // txhais ntawm qhov chaw ntawm tus pin uas nws nyob

byte LecturaUID [4] = {0x00, 0x00, 0x00, 0x00}; // peb khaws qhov nyeem tus nqi ntawm UIDbyte Usuario1 [4] = {0xEB, 0x77, 0xB5, 0x1C}; // uid ntawm daim npav // 0x nyob rau pem hauv ntej los qhia tias tus lej yog hexadecimal byte Usuario2 [4] = {0xBA, 0xFB, 0x88, 0x15};

void teeb tsa () {

Serial.begin (9600); // pib ua kev sib txuas lus nrog PC SPI.begin (); mfrc522. PCD_Init (); // initialize tus nyeem ntawv module // PCD: Qhov sib thooj sib txuas ntaus ntawv (nyeem ntawv module) Serial.println ("BIENVENIDO AL SISTEMA"); // rau khau raj yam tsis muaj qhov screen khoob lcd.begin (16, 2); // tsis raug cai. Indica el tamaño del lcd de 16columnas y 2filas}

void voj () {

yog (! mfrc522. PICC_IsNewCardPresent ()) // PICC: Kev sib thooj sib xyaw ua ke Circuit Chip (daim npav lossis cov keychain) // kos yog tias tsis muaj daim npav xa rov qab; // ua tiav qhov rov qab, rov qab mus rau lub luag haujlwm yav dhau los // yog li kom txog thaum nws pom daim npav lossis tus lej tseem ceeb

yog (! mfrc522. PICC_ReadCardSerial ()) // yog tias koj pom daim npav, nug seb koj puas tuaj yeem tau txais cov ntaub ntawv los ntawm nws

rov qab; // yog tias koj tsis tuaj yeem tau txais cov ntaub ntawv, xa rov qab

Serial.print ("UID:"); // kom tau txais tsuas yog tus lej cim lossis tus lej tseem ceeb

rau (byte i = 0; i <mfrc522.uid.size; i ++) {// iteration variable ntawm byte yam Loop yuav nyeem ib byte ntawm ib lub sijhawm yog (mfrc522.uid.uidByte <0x10) { / / format cov ntawv kom pom los ntawm tus saib Serial.print ("0"); } lwm {Serial.print (""); } Serial.print (mfrc522.uid.uidByte , HEX); // qhia pom lub voj nyeem ntawm tus saib, Hex qhia tias cov ntawv hauv hexadecimal format tau tshwm sim LecturaUID = mfrc522.uid.uidByte ; // mus qhia cov byte ntawm ib lub sijhawm thiab tib lub sijhawm khaws cia nws}

Serial.print ("\ t"); // tawm qhov chaw nruab nrab ntawm cov uid thiab tus lej uas ua raws

yog (sib pivUID (LecturaUID, Usuario1)) {// nws ua qhov sib piv ntawm uid ntawm daim npav / keychain uas peb mus rau tus nyeem nrog uid ntawm tus neeg siv 1

Serial.println ("n ° 1002 061055881 01 08 1 || penicilina, naproxeno sódico"); // yog tias qhov kev sib piv no ua tiav, tus nqi muaj tseeb, luam cov ntawv ntawm lub vijtsam

lcd.setCursor (3, 0); // tso rau kab twg thiab kab twg peb pib sau

lcd.print ("Mariana Benitez"); // cov ntawv pom ntawm qhov screen lcd.setCursor (3, 1); lcd.print ("penicilina, naproxeno sodico");

rau (byte j = 1; j <20; j ++) {// delimits kev ua haujlwm ntawm kev txav mus rau tsuas yog 20 txav lcd.scrollDisplayLeft (); // sab laug scroll muaj nuj nqi ncua (500); // sijhawm} ncua (1000); byte LecturaUID [4] = {0x00, 0x00, 0x00, 0x00}; // ua LecturaUID dua lcd.begin (16, 2); // screen tsis muaj ntawv nyeem

}

lwm tus yog (sib pivUID (LecturaUID, Usuario2)) {// nws ua qhov sib piv ntawm uid ntawm daim npav / keychain uas peb mus rau tus nyeem nrog uid ntawm tus neeg siv 2 Serial.println ("n ° 1007 041089231 03 06 1 | | sin alergias conocidas "); // dua, yog tias nws rov muaj tseeb nws luam cov ntawv ntawm lub vijtsam lcd.setCursor (2, 0); lcd.print ("Laura Escofet"); lcd.setCursor (2, 1); lcd.print ("sin alergias conocidas");

rau (byte j = 1; j <15; j ++) {lcd.scrollDisplayLeft (); ncua (500); } ncua (1000); byte LecturaUID [4] = {0x00, 0x00, 0x00, 0x00}; lcd.begin (16, 2); } lwm {Serial.println ("usuario tsis muaj tus sau npe"); // yog tias kev sib piv tsis ua tiav, cov ntawv tau nthuav tawm lcd.setCursor (0, 0); lcd.print ("tsis muaj npe"); ncua (2000); byte LecturaUID [4] = {0x00, 0x00, 0x00, 0x00}; lcd.begin (16, 2); }

mfrc522. PICC_HaltA (); // xaus qhov kev sib txuas lus nrog daim npav

}

boolean comparaUID (byte lectura , byte usuario ) {// qhov haujlwm no sib piv thiab yuav rov qab tus nqi cuav yog tias nyeem uid txawv ntawm tus neeg siv thiab qhov tseeb yog ob qho tib si sib npaug

rau (byte i = 0; i <mfrc522.uid.size; i ++) {if (lectura ! = usuario ) // yog tias ib qho ntawm qhov txiaj ntsig tsis sib npaug rov qab (tsis tseeb); // peb tawm ntawm txoj haujlwm rov qab tus nqi cuav} rov qab (muaj tseeb); // yog tias txhua yam sib xws}

Kauj ruam 4: MOCK-UP

MOCK-UP
MOCK-UP
MOCK-UP
MOCK-UP
MOCK-UP
MOCK-UP

Hauv cov kauj ruam no tau piav qhia peb li cas tsim cov mock-up los simulate qhov twg yuav raug cog cov cuab yeej sib txawv hauv tib neeg lub cev.

Mock-up yog ua raws li 3 txheej txheem. Lawv yuav tsum tau so, txhua lub sijhawm uas ib tus txheej txheem tiav, thiab ua raws li kev txiav txim.

Thawj txheej txheem suav nrog ua tus qauv sab hauv ntawm tes thiab taub hau. Lub hom phiaj no tuaj yeem ua tiav raws li cov lus qhia:

  1. Xaiv tus qauv zam thiab muab lub hauv paus hauv ib feem ntawm lub cev uas yuav rov ua dua.
  2. Txiav lub plaster band hauv daim, sib tov nws nrog dej hauv lub tais thiab npog lub tes thiab lub taub hau ntawm tus qauv. Tsis txhob npog qhov ntswg, qhov ncauj thiab qhov muag.
  3. Cia tus qauv so 15 feeb thiab so haujlwm ntawm tus qauv lub cev thaum nws tsis qhuav tag.
  4. Siv cov ntaub ntub dej ntub los npog qhov kawg
  5. Cia nws qhuav 20 feeb.

Cov txheej txheem thib ob muaj lub hom phiaj ua kom cov qauv sab hauv tiv taus ntau dua. Cov theem tom ntej piav qhia yuav ua li cas:

1. Muab cov hmoov dawb tso nrog dej hauv lub tais.

2. Npog cov qauv sab hauv nrog cov khoom sib xyaw.

3. Cia nws so ib hnub.

4. Nrog cov ntawv txhuam txhuam nto.

Cov txheej txheem thib peb suav nrog pleev xim rau kev pleev xim dub thiab tso nws kom qhuav.

Kauj ruam 5: RESULT

Pom zoo: