Cov txheej txheem:
Video: Safe Box: 3 Kauj Ruam
2024 Tus sau: John Day | [email protected]. Kawg hloov kho: 2024-01-30 09:29
Nov yog qhov koj qhov txiaj ntsig kawg yuav tsum yog tom qab muab tso ua ke thiab tso cov cai.
Kauj Ruam 1: Yam Koj Yuav Tsum Tau
Jumper Wires, 220 OHM resistor, 16x2 LCD Screen, Push Button, Servo Motor, Breadboard, Arduino Uno.
Kauj ruam 2: Code
James chinchay
#suav nrog
#ncig #ncig
int chaw nyob = 0; zoo li qub tsis tau kos npe ntev SaveTimer; zoo li tsis tau kos npe ntev SaveDelay = (30 * 1000);
char CODE [10] = "1234E"; char Str [10]; char CodeLength = 4; int Pos = 0; bool Xauv; zoo li tsis tau kos npe ntev DisplayTimer; zoo li tsis tau kos npe ntev DisplayDelay = 200;
LiquidCrystal lcd (12, 11, 9, 8, 7, 6);
int buttonPin1 = 2; int buttonPin2 = 3; int buttonPin3 = 4; int buttonPin4 = 5;
int nkag mus = 10; int clearlockbutton = 13;
Servo myServo; // teeb tsa qhov kev tsim kho qhov program tsis ua haujlwm teeb tsa () {
myServo.attach (A1);
int EEPROMCodeOK = muaj tseeb; rau (Pos = 0; Pos <= (CodeLength); Pos ++) {Str [Pos] = EEPROM.read (Pos); yog (! (strrchr ("1123456789", Str [Pos]))) {// tsis yog tus lej siv tau EEPROMCodeOK = cuav; }} Pos ++; Str [Pos] = EEPROM.read (Pos); yog (Str [CodeLength + 1]! = 'E') EEPROMCodeOK = tsis tseeb; yog (EEPROMCodeOK) {Str [CodeLength + 2] = '\ 0'; strncpy (CODE, Str, CodeLength + 1); } ClearCode (); // teeb tsa inputs pinMode (buttonPin1, INPUT_PULLUP); pinMode (buttonPin2, INPUT_PULLUP); pinMode (buttonPin3, INPUT_PULLUP); pinMode (buttonPin4, INPUT_PULLUP);
pinMode (enterbutton, INPUT_PULLUP); pinMode (clearlockbutton, INPUT_PULLUP);
lcd.begin (16, 2); lcd.setCursor (0, 0); // teeb tsa lcd.print messaged ("Nyob Zoo Mr Birch"); ncua (2000); lcd.clear (); lcd.setCursor (0, 0); // teeb tsa sai rau lo lus zais lcd.print ("Password:");
DisplayTimer = millis () + 200; }
void voj () {
Xauv ();
Pos = txwv (Pos, 0, CodeLength); // nyeem cov nyees khawm int buttonState1 = digitalRead (buttonPin1); int buttonState2 = digitalRead (buttonPin2); int buttonState3 = digitalRead (buttonPin3); int buttonState4 = digitalRead (buttonPin4);
int clButtonState = digitalRead (clearlockbutton); int enterButtonState = digitalRead (enterbutton);
lcd.setCursor (9, 0); // yuav tsum tau qhib yog tias (buttonState1 == LOW) {Str [Pos] = '1'; Pos ++; Str [Pos] = '\ 0'; ncua (250); thaum (digitalRead (buttonPin1) == LOW);
}
lwm tus yog (buttonState2 == LOW) {Str [Pos] = '2'; Pos ++; Str [Pos] = '\ 0'; ncua (250); thaum (digitalRead (buttonPin2) == QAU);
}
lwm tus yog (buttonState3 == LOW) {Str [Pos] = '3'; Pos ++; Str [Pos] = '\ 0'; ncua (250); thaum (digitalRead (buttonPin3) == QAU); }
lwm tus yog (buttonState4 == LOW) {Str [Pos] = '4'; Pos ++; Str [Pos] = '\ 0'; ncua (250); thaum (digitalRead (buttonPin4) == QAU);
} lwm yog (enterButtonState == LOW) {Str [Pos] = 'E'; Pos ++; Str [Pos] = '\ 0'; ncua (250); thaum (digitalRead (buttonPin1) == LOW); yog (strcmp (Str, CODE) == 0) {Xauv = muaj tseeb; lcd.setCursor (0, 0); lcd.print ("Tau Txais Kev Pab"); ncua (2000); lcd.clear (); lcd.print ("Xauv"); } lwm yog (SaveTimer> millis () && (Pos + 1) == CodeLength) {
strcpy (CODE, Str); rau (Pos = 0; Pos <= (CodeLength+1); Pos ++) {EEPROM.write (Pos, Str [Pos]); } lcd.setCursor (0, 0); lcd.print ("Txuag Nyiaj Code:"); lcd.setCursor (0, 1); lcd.print (Str);
Xauv = muaj tseeb; }
lwm tus {
lcd.clear (); lcd.print ("Nkag Tsis Tau."); ncua (2000); lcd.clear (); lcd.print ("Lo lus zais:");
} // unlocking code thaum (Xauv) {Unlock (); yog (digitalRead (clearlockbutton) == LOW) {ncua (200); lcd.clear (); lcd.print ("Xauv"); ncua (2000); lcd.clear (); Xauv = tsis tseeb; SaveTimer = millis () + 30000; }}
ClearCode ();
}
lwm tus yog (clButtonState == LOW) {ncua (500);
thaum (clearlockbutton == LOW); yog ((millis () - SaveTimer)> 4500) {
}
ClearCode ();
}
yog ((ntev) (millis () - DisplayTimer)> = 0) {DisplayTimer += DisplayDelay; lcd.setCursor (9, 0); lcd.print (Str); lcd.print ("");
} }
tsis muaj dab tsi ClearCode () {
Pos = 0; Str [Pos] = '\ 0'; lcd.setCursor (0, 0); lcd.print ("Lo lus zais:"); lcd.setCursor (0, 1); lcd.print ("");
}
void Unlock () {
myServo.write (150);
} // program locking button void Lock () {
myServo.write (50);
}
Kauj ruam 3:
thaum ua txhua yam nws yuav tsum zoo li no.
Pom zoo:
Corona Safe: Tsis Siv Neeg Siv Dej Txuag Dej: 6 Kauj Ruam
Corona Safe: Tsis Siv Neeg Siv Dej Txuag Dej: Peb txhua tus yuav tsum tau ntxuav tes txhua tam sim no kom tshem tau tus kab mob thiab cov kab mob tshwj xeeb rau tus kab mob Corona peb yuav tsum tau ntxuav peb txhais tes li 20 feeb kom tshem tau nws. Tsis tas li lub xab npum dispenser lossis lub pob qhov rooj yuav tsis tsim nyog yuav tsum tau tu los yog
HackerBox 0057: Safe Mode: 9 Kauj Ruam
HackerBox 0057: Hom Nyab Xeeb: Txais tos rau HackerBox Hackers thoob ntiaj teb! HackerBox 0057 nqa ib lub zos ntawm IoT, Wireless, Lockpicking, thiab tau kawg Hardware Hacking txoj cai rau hauv koj lub tsev lab. Peb yuav tshawb xyuas cov phiaj xwm microcontroller, IoT Wi-Fi siv, Bluetooth int
B-Safe, Portable Safe: 8 Kauj Ruam (nrog Duab)
B-Safe, Portable Safe: *** Cuaj hlis 4th 2019: Kuv tau muab cov ntaub ntawv 3D tshiab ntawm lub thawv nws tus kheej. Nws zoo li kuv xauv yog 10 hli siab dhau rau qhov kaw zoo *** Qhov teeb meem Xav txog qhov no: Koj sawv ib tag kis thiab huab cua zoo tiag tiag. Koj xav mus rau lub puam vim tias koj tsis
RFID Bank Safe: 3 Kauj Ruam
RFID Lub txhab nyiaj nyab xeeb: RFID yog lub cim qhia xov tooj cua. Lub txhab nyiaj nyab xeeb yog nyab xeeb rau cov khoom muaj nqis. Muab ob qho ua ke ua rau Lub txhab nyiaj muaj kev nyab xeeb dua. Nov yog yuav ua li cas tsim ib qho ntawm Arduino cov khoom thiab me ntsis ntawm chaw ua haujlwm chaw nres tsheb
Arduino Raws Digital SAFE BOX: 10 Kauj Ruam
Arduino Raws Digital SAFE BOX: Hav guys! Koj puas muaj qee yam uas koj xav kom nyab xeeb? Ib yam dab tsi uas yuav tsum tau khaws kom deb ntawm cov neeg nkag tsis xav tau thiab tsis pub lwm tus neeg nkag mus? Zoo, kuv muaj qhov kev daws teeb meem rau koj! Nov yog Arduino raws xauv Safe Box