Cov txheej txheem:

LCD Tshuab Luam Ntawv los ntawm Jai Mishra: 8 Kauj Ruam
LCD Tshuab Luam Ntawv los ntawm Jai Mishra: 8 Kauj Ruam

Video: LCD Tshuab Luam Ntawv los ntawm Jai Mishra: 8 Kauj Ruam

Video: LCD Tshuab Luam Ntawv los ntawm Jai Mishra: 8 Kauj Ruam
Video: Playful Kiss - Playful Kiss: Full Episode 1 (Official & HD with subtitles) 2024, Kaum ib hlis
Anonim
LCD Tshuab Luam Ntawv los ntawm Jai Mishra
LCD Tshuab Luam Ntawv los ntawm Jai Mishra

Tinkercad Cov Haujlwm »

Nov yog qhov haujlwm muaj txiaj ntsig zoo uas qhia koj yuav tsim koj li lub tshuab xam zauv li cas. Koj tuaj yeem tsim tus lej no hauv online lossis hauv lub neej tiag tiag nrog kev pab ntawm cov khoom siv ntxiv tab sis tam sim no peb tsuas yog tsom mus rau kev tsim lub laij lej online.

Khoom siv

  • Arduino Uno R3
  • 220 Ohms tiv thaiv
  • 4*4 Keypad
  • 16*2 LCD
  • Ib pawg ntawm cov xov hlau txuas rau hauv Circuit Court

Kauj Ruam 1: Sau Koj Cov Khoom Siv ntawm TinkerCad

Sau koj cov khoom siv ntawm TinkerCad
Sau koj cov khoom siv ntawm TinkerCad

Ua kom ntseeg tau tias txhua yam ntawm koj cov khoom siv muaj ua ntej peb pib nrog qib 2 txhawm rau txo kev ntxhov siab thiab yuam kev. Nco ntsoov tseem siv cov khoom siv raug, qee cov khoom siv ntawm cov duab saum toj no zoo ib yam li lwm cov khoom, yog li tsis txhob sib xyaw ua ke. Siv daim duab saum toj no raws li koj qhia.

Kauj Ruam 2: Npaj Koj Cov Khoom Siv

Teem Koj Cov Khoom Siv
Teem Koj Cov Khoom Siv

Kev npaj koj cov khoom siv yog txoj hauv kev zoo tshaj plaws los saib ua ntej ntawm koj lub tshuab xam zauv yuav zoo li cas. Koj tuaj yeem tsim txhua hom kev laij lej tsim koj xav tau tab sis xyuas kom tseeb tias lub laij lej zoo li qub thiab cov neeg siv tuaj yeem nkag siab qhov tsim thiab tsis nkag siab. Kuv siv lub tshuab xam zauv zoo ib yam uas ua tau zoo thiab nkag siab tau los ntawm txhua tus. Koj tuaj yeem xaiv qhov kuv tsim lossis tsim koj tus kheej, tab sis xijpeem nws muaj tswv yim thiab hmoov zoo!

Kauj Ruam 3: Txuas Cov Hluav Taws Xob

Txuas Cov Xov
Txuas Cov Xov

Kev txuas cov xov hlau yog txoj haujlwm nyuaj yog tias koj tsis nkag siab lub ntsiab lus tom qab. Hauv txoj kab hluav taws xob no, peb tau sim txuas tag nrho plaub yam ua ke kom lawv tuaj yeem ua haujlwm ua ib pab pawg thaum nws txog sijhawm sau cov cai. Yog tias tsis muaj xov hlau, tsis muaj qhov tam sim no yuav ntws, ua rau txoj haujlwm tsis ua tiav. Xyuas kom koj cov xov hlau txuas nrog kom raug yam tsis muaj kev nkag siab yuam kev.

Tom qab koj ua tiav txuas cov xov hlau, xyuas kom tseeb tias koj cov xov hlau tau zoo thiab tau teeb tsa kom nws yooj yim dua rau koj thiab lwm tus kom nkag siab qhov tseeb yog mus li cas hauv kev kho vajtse ntawm lub tshuab xam zauv no. Zoo li kuv tau hais ua ntej, koj tuaj yeem siv kuv cov txheej txheem ntawm kev teeb tsa koj cov xov hlau lossis koj tuaj yeem tsim koj tus kheej, tab sis xijpeem koj txiav txim siab ua, nco ntsoov tias lawv tau sib dhos nrog qee qhov chaw.

Kauj Ruam 4: Sau Txoj Cai

Sau Txoj Cai
Sau Txoj Cai
Sau Txoj Cai
Sau Txoj Cai
Sau Txoj Cai
Sau Txoj Cai

#suav nrog

#ncig #ncig

LiquidCrystal lcd (13, 12, 11, 10, 9, 8);

ntev ua ntej = 0; ntev thib ob = 0; ob npaug = 0;

char customKey; const byte ROWS = 4; const byte COLS = 4;

char keys [ROWS] [COLS] = {{'1', '4', '7', '/'}, {'2', '5', '8', '+'}, {'3', '6', '9', '-'}, {'C', '0', '=', '*'}}; byte rowPins [ROWS] = {7, 6, 5, 4}; // txuas rau kab pinouts ntawm cov keyboard byte colPins [COLS] = {3, 2, 1, 0}; // txuas mus rau kab ntawv pinouts ntawm cov keyboard

// pib qhov piv txwv ntawm chav kawm NewKeypad Keypad customKeypad = Keypad (uaKeymap (cov yawm sij), rowPins, colPins, ROWS, COLS);

teeb tsa tsis muaj dab tsi () {lcd.begin (16, 2); // pib lcd rau (int kuv = 0; kuv <= 3; kuv ++); lcd.setCursor (0, 0); lcd.print ("Tshuab xam zauv"); lcd.setCursor (0, 1); lcd.print ("Los ntawm Jai Mishra"); ncua (4000); lcd.clear (); lcd.print ("Qhov project kawg"); ncua (2500); lcd.clear (); lcd.setCursor (0, 0); }

void voj () {

customKey = customKeypad.getKey (); hloov (customKey) {rooj plaub '0'… '9': // Qhov no khaws thawj tus nqi kom txog thaum tus neeg teb xov tooj raug nias "+-*/" lcd.setCursor (0, 0); thawj = thawj * 10 + (customKey - '0'); lcd.print (thawj); tawg;

case '+': thawj = (tag nrho! = 0? tag nrho: thawj); lcd.setCursor (0, 1); lcd.print ("+"); thib ob = SecondNumber (); // tau txais tus lej thib ob tag nrho = thawj + thib ob; lcd.setCursor (0, 3); lcd.print (tag nrho); thawj = 0, thib ob = 0; // rov pib qhov tseem ceeb rov qab rau xoom rau kev siv so tom ntej;

case '-': thawj = (tag nrho! = 0? tag nrho: thawj); lcd.setCursor (0, 1); lcd.print ("-"); thib ob = SecondNumber (); tag nrho = thawj - thib ob; lcd.setCursor (0, 3); lcd.print (tag nrho); thawj = 0, thib ob = 0; tawg;

case '*': thawj = (tag nrho! = 0? tag nrho: thawj); lcd.setCursor (0, 1); lcd.print ("*"); thib ob = SecondNumber (); tag nrho = thawj * thib ob; lcd.setCursor (0, 3); lcd.print (tag nrho); thawj = 0, thib ob = 0; tawg;

case '/': thawj = (tag nrho! = 0? tag nrho: thawj); lcd.setCursor (0, 1); lcd.print ("/"); thib ob = SecondNumber (); lcd.setCursor (0, 3);

thib ob == 0? lcd.print ("Tsis raug"): tag nrho = (ntab) thawj / (ntab) thib ob;

lcd.print (tag nrho); thawj = 0, thib ob = 0; tawg;

rooj plaub 'C': tag nrho = 0; lcd.clear (); tawg; }}

ntev SecondNumber () {thaum (1) {customKey = customKeypad.getKey (); yog (customKey> = '0' && customKey <= '9') {thib ob = thib ob * 10 + (customKey - '0'); lcd.setCursor (0, 2); lcd.print (thib ob); }

yog (customKey == '=') tawg; // rov thib ob; } rov thib ob; }

Kauj ruam 5: Ua txhaum Txoj Cai

Ua txhaum Txoj Cai
Ua txhaum Txoj Cai

Peb pib qhov tseem ceeb rau lub khoos phis tawj kom nkag siab

#suav nrog

#ncig #ncig

LiquidCrystal lcd (13, 12, 11, 10, 9, 8);

ntev ua ntej = 0; ntev thib ob = 0; ob npaug = 0;

char customKey; const byte ROWS = 4; const byte COLS = 4;

Peb tau hais qhia lub khoos phis tawj cov lej thiab cov cim ntawm qhov Keypad yuav tsum ua haujlwm

char keys [ROWS] [COLS] = {{'1', '2', '3', '/'}, {'4', '5', '6', '+'}, {'7', '8', '9', '-'}, {'C', '0', '=', '*'}};

Peb ua tiav kab thiab kab ntawm cov keyboard thiab tus lej los rau hauv kab twg, thiab lwm yam

byte rowPins [ROWS] = {7, 6, 5, 4}; byte colPins [COLS] = {3, 2, 1, 0};

Peb tsim cov lus qhia, lossis lub zog ntawm lub vijtsam rau lub khoos phis tawj (Koj tuaj yeem sau koj lub npe rau ntawm nws)

teeb tsa tsis muaj dab tsi () {lcd.begin (16, 2); rau (int kuv = 0; kuv <= 3; kuv ++); lcd.setCursor (0, 0); lcd.print ("Tshuab xam zauv"); lcd.setCursor (0, 1); lcd.print ("Los ntawm Jai Mishra"); ncua (4000); lcd.clear (); lcd.print ("Qhov project kawg"); ncua (2500); lcd.clear (); lcd.setCursor (0, 0); }

Peb tsim lub ntsiab lus thiab cov qauv rau txhua qhov haujlwm hauv lub laij lej kom lub khoos phis tawj nkag siab tias yuav siv cov mis twg thaum tus neeg siv nias "+" ntawm lub laij lej, thiab lwm yam

{rooj plaub '0'… '9': lcd.setCursor (0, 0); thawj = thawj * 10 + (customKey - '0'); lcd.print (thawj); tawg;

case '/': thawj = (tag nrho! = 0? tag nrho: thawj); lcd.setCursor (0, 1); lcd.print ("/"); thib ob = SecondNumber (); lcd.setCursor (0, 3);

thib ob == 0? lcd.print ("Tsis raug"): tag nrho = (ntab) thawj / (ntab) thib ob;

lcd.print (tag nrho); thawj = 0, thib ob = 0; tawg; case '+': thawj = (tag nrho! = 0? tag nrho: thawj); lcd.setCursor (0, 1); lcd.print ("+"); thib ob = SecondNumber (); lcd.setCursor (0, 3); lcd.print (tag nrho); thawj = 0, thib ob = 0; tawg;

case '-': thawj = (tag nrho! = 0? tag nrho: thawj); lcd.setCursor (0, 1); lcd.print ("-"); thib ob = SecondNumber (); tag nrho = thawj - thib ob; lcd.setCursor (0, 3); lcd.print (tag nrho); thawj = 0, thib ob = 0; tawg;

case '*': thawj = (tag nrho! = 0? tag nrho: thawj); lcd.setCursor (0, 1); lcd.print ("*"); thib ob = SecondNumber (); tag nrho = thawj * thib ob; lcd.setCursor (0, 3); lcd.print (tag nrho); thawj = 0, thib ob = 0; tawg;

rooj plaub 'C': tag nrho = 0; lcd.clear (); tawg; }}

Cov cai yog yooj yim heev, txhua yam koj yuav tsum ua yog sim nkag siab nws thiab tom qab ntawd txhua yam tuaj yeem ua tau yooj yim. Yog tias muaj teeb meem nrog tus lej, email rau kuv

Kauj Ruam 6: Cov Khoos Phis Tawj ntawm Lub Tshuab Xauv no Ua Haujlwm Li Cas?

Cov Khoos Phis Tawj ntawm Lub Tshuab Xauv no Ua Haujlwm Li Cas?
Cov Khoos Phis Tawj ntawm Lub Tshuab Xauv no Ua Haujlwm Li Cas?

Lub tshuab xam zauv no siv, LCD, lub keypad, Arduino board thiab 220 ohms resistor. Txhua yam ntawm cov khoom no yog sib cais tab sis txuas nrog cov xov hlau los ntawm Arduino mus rau cov keyboard thiab LCD. Cov ntu sib txawv ntawm LCD tau txuas nrog Arduino board uas thaum kawg txuas ob qho tib si nrog Keypad. Tom qab kev sib txuas, tus lej ua txhua txoj haujlwm thiab muab txhua lub lag luam thiab khawm ntawm lub keypad ib txoj haujlwm kom ua raws.

Kauj Ruam 7: Ua Ntej Ua Ntej Ua Ntej ntawm Lub Tshuab Ntsuas

Nov yog qhov peb qhov project kawg zoo li! Yog tias koj tus lej tsis ua haujlwm, lossis muaj qee qhov kev nyuaj tom qab ntawv thov email rau kuv thiab kuv yuav sim kuv qhov zoo tshaj plaws los pab koj tsim lub tshuab xam zauv zoo tshaj plaws!

Kauj Ruam 8: Kuv Kev tshoov siab ntawm Txoj Cai No

Kuv tau txais kev tshoov siab los ntawm cov vis dis aus saum toj no yuav ua li cas los ua lub laij lej ntawm tinkercad! Kuv tsis tau theej thiab luam dab tsi tab sis kuv tau siv nws lub tswv yim ntawm lub laij lej thiab nkag siab txog cov cai.

Pom zoo: