Cov txheej txheem:

NameSmasher: 5 Kauj Ruam (nrog Duab)
NameSmasher: 5 Kauj Ruam (nrog Duab)

Video: NameSmasher: 5 Kauj Ruam (nrog Duab)

Video: NameSmasher: 5 Kauj Ruam (nrog Duab)
Video: 10 самых АТМОСФЕРНЫХ мест Дагестана. БОЛЬШОЙ ВЫПУСК #Дагестан #ПутешествиеПоДагестану 2024, Kaum ib hlis
Anonim
NpeSmasher
NpeSmasher

Namesmasher- tsoo ntawm 2 lub npe !!!!!!

Kauj ruam 1: Taw qhia

Txoj haujlwm no yooj yim heev, tam sim no kuv tau ua nws. Yeej, yam koj yuav tsum tau ua yog txuas lub LCD thiab 2 lub nyees khawm rau Arduino thiab tom qab ntawd BAM koj tau txais lub npe cim npe. Ib lub npe masher tshwm sim thaum koj nias lub pob thiab tom qab ntawd ib lub npe ntsais muag, zoo ib yam. Tab sis thaum koj nias ob qho tib si, ob lub npe yuav tshwm tuaj kom txog thaum koj tso tseg.

Kauj Ruam 2: Cov Ntaub Ntawv:

Cov ntaub ntawv
Cov ntaub ntawv
Cov ntaub ntawv
Cov ntaub ntawv
Cov ntaub ntawv
Cov ntaub ntawv
Cov ntaub ntawv
Cov ntaub ntawv

Txhua yam koj xav tau yog:

6 txiv neej xov hlau;

4 poj niam xov hlau;

2 resistors;

2 khawm;

ib Arduino;

ib qho LCD kua siv lead ua zaub;

thiab daim ntawv qhia zaub mov.

Kauj ruam 3: Teeb

Teeb
Teeb
Teeb
Teeb
Teeb
Teeb

Yuav teeb lub LCD kua siv lead ua kua li cas;

Raws li koj tuaj yeem pom hauv daim duab koj yuav tsum txuas GND, VCC, SDA, thiab SCL rau nws cov ntsiab lus sib xws ntawm Arduino.

Kauj ruam 4: Code

#suav nrog

#suav nrog

LiquidCrystal_I2C lcd (0x27, 2, 1, 0, 4, 5, 6, 7, 3, POSITIVE);

int votes [4] = {0, 0, 0, 0};

char inbyte;

String pwd = "VOTE";

Txoj hlua inpt = "";

boolean chij = cuav;

boolean securitygranted = tsis tseeb;

koj i;

int buttonstate1 = 0; // teeb tsa buttonstates rau 0

int buttonstate2 = 0;

int buttonstate3 = 0;

int buttonstate4 = 0;

void teeb tsa () {

pinMode (2, INPUT); // Cov tswv yim

pinMode (3, INPUT);

lcd.begin (16, 2);

lcd.display ();

Serial.begin (9600);

Serial.println ("ENTER PASSWORD");

}

void voj () {

lcd.setCursor (0, 0);

buttonstate3 = digitalRead (2); // nyeem cov nyees khawm

buttonstate4 = digitalRead (3);

Serial.print (buttonstate3);

Serial.print (buttonstate4);

yog (buttonstate3 == 1) {// yog tias buttonstate nyob ntawm 1

lcd.write ("Gaya"); // Luam qhov no rau ntawm lub vijtsam LCD

ncua (100); }

yog (buttonstate4 == 1) {// yog tias buttonstate nyob ntawm 1

lcd.write ("Jeremy"); // Luam qhov no rau ntawm lub vijtsam LCD

ncua (100);

} yog (buttonstate3 == 0) {// yog tias buttonstate nyob ntawm 0

lcd.clear (); // Tshem lub vijtsam LCD

ncua (100); }

yog (buttonstate4 == 0) {

lcd.clear (); ncua (100);

}

}

Kauj Ruam 5: Xaus

Yog li tom qab txhua qhov no, Kuv nyob ntawm no hais tias koj tuaj yeem ua qhov haujlwm no txawm tias txias dua li qhov kuv tau ua. Koj tuaj yeem ntxiv cov nyees khawm kom koj tuaj yeem sau ntau lub npe. Koj tuaj yeem ua rau nws yog kev pov npav. Sim ntxiv ob (lwm yam) LCDs thiab sim nrog qhov ntawd. Muaj ntau yam uas koj tuaj yeem ua nrog lub tswv yim no.

Hmoov zoo thiab zoo siab hnub so !!

Pom zoo: