Cov txheej txheem:

Tshuab xam zauv TinkerCad kev sib tw: 8 Cov kauj ruam
Tshuab xam zauv TinkerCad kev sib tw: 8 Cov kauj ruam

Video: Tshuab xam zauv TinkerCad kev sib tw: 8 Cov kauj ruam

Video: Tshuab xam zauv TinkerCad kev sib tw: 8 Cov kauj ruam
Video: Tsov & Tsuv 1 - Hmong Movie 2024, Hlis ntuj nqeg
Anonim
Tshuab xam zauv TinkerCad
Tshuab xam zauv TinkerCad

Hav, yog li tsis ntev los no kuv tau tshawb nrhiav yuav ua li cas siv ntau hom kev cai rau hauv Circuit Court. Kuv pom tias kev ua lub laij lej yuav yog ib txoj hauv kev zoo los siv "rooj plaub" thiab lwm yam kev cai uas kuv pom tau nthuav. Kuv muaj yav dhau los ua cov laij lej ncaj qha los ntawm cov lej, tab sis ua ib qho Circuit Court rau nws tau ua rau kuv txaus siab. Tshwj xeeb tshaj yog lub sijhawm quarantine qhov twg kuv nyob ntawm kuv lub khoos phis tawj yuav luag tag hnub. Txoj haujlwm no yog siv kev ua lej ntawm lub vijtsam LCD.

Kauj ruam 1: Cov ntaub ntawv

Rau Circuit Court:

  • LCD 16 x 2
  • Arduino Uno R3
  • Keypad 4 x 4
  • Me Breadboard
  • Lub zog ntsuas (250 kΩ)
  • Kev tiv thaiv (1kΩ)
  • x26 jumper xov

Kauj ruam 2: Txuas tus 4x4 Keypad

Txuas tus 4x4 Keypad
Txuas tus 4x4 Keypad

Txuas 4 kab pins ntawm 4x4 keypad rau Arduino pins 4-7, thiab txuas 4 kab pins rau Arduino pins 0-3.

Kauj Ruam 3: Muab Lub Hwj Huam rau Breadboard thiab Txuas LCD

Muab Lub Hwj Chim rau Breadboard thiab Txuas LCD
Muab Lub Hwj Chim rau Breadboard thiab Txuas LCD

Kuv siv lub zog hluav taws xob ntawm 5 rau lub khob cij. Kuv txuas lub zog thiab hauv av rau ntawm daim ntawv qhia zaub mov. Lub LCD tau muab tso rau ntawm lub khob cij, thiab tso kom tag nrho nws cov pins tau txuas nrog lub khob cij.

Kauj Ruam 4: Txuas Lub Hwj Huam thiab Av rau LCD

Txuas Lub Hwj Huam thiab Av rau LCD
Txuas Lub Hwj Huam thiab Av rau LCD

Yuav muaj 3 tus pin hauv av xav tau txuas nrog LCD. Ib qho yuav txuas nrog hauv av nws tus kheej ntawm LCD, lwm qhov yuav txuas nrog LED ntawm LCD, thiab qhov kawg yuav txuas nrog RW. VCC ntawm LCD thiab coj yuav xav tau lub hwj chim txuas nrog. Txawm li cas los xij lub zog rau LED yuav xav tau tus tiv thaiv txuas nrog hauv qhov no kuv siv 1kΩ resistor.

Kauj Ruam 5: Txuas Potentiometer

Txuas tus Potentiometer
Txuas tus Potentiometer

Txuas tus potentiometer mus rau lub khob cij nrog 3 kab dawb. Nws yuav muaj 3 tus pin, kem uas muaj lub davhlau ya nyob twg 1 tus pin yuav xav tau av muab rau nws. Cov kem uas muaj lub dav hlau 2 tus pin yuav xav tau lub zog muab rau nws. Tom qab ntawd lub wiper yuav muaj lub xaim xaim xaim hauv nws kab ntawv uas txuas rau VO ntawm LCD.

Kauj Ruam 6: Txuas Arduino rau LCD

Txuas Arduino rau LCD
Txuas Arduino rau LCD

Pins 8-13 ntawm Arduino yuav txuas nrog LCD. Pins 8-11 ntawm Arduino yuav txuas rau D8 (7-4) feem. Tom qab ntawd tus pin 12 ntawm Arduino yuav txuas nrog Enable ntawm LCD, thiab tus pin 13 ntawm Arduino yuav txuas rau lub npe ntawm LCD.

Kauj Ruam 7: Siv Txoj Cai

Yuav tsum muaj tus lej txhawm rau siv cov lej ua lej nrog cov keyboard thiab LCD. Cov hauv qab no yuav yog cov cai kuv siv, txawm li cas los xij ntau qhov kev hloov pauv tseem tuaj yeem kuv ua kom nws huv thiab zoo dua. Yog li xav tias dawb ua si nrog nws me ntsis.

#ncig #ncig

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

ntev ua ntej = 0;

ntev thib ob = 0;

ob npaug = 0;

int posit = 0;

char customKey;

const byte ROWS = 4;

const byte COLS = 4;

tus yuam sij [ROWS] [COLS] = {

{'1', '2', '3', '/'}, {'4', '5', '6', '*'}, {'7', '8', '9', '-'}, {'C', '0', '=', '+'}};

byte rowPins [ROWS] = {7, 6, 5, 4};

byte colPins [COLS] = {3, 2, 1, 0};

Keypad customKeypad = Keypad (uaKeymap (tuav), rowPins, colPins, ROWS, COLS);

void teeb tsa () {

lcd.begin (16, 2);

lcd.setCursor (5, 0);

lcd.clear (); }

void voj () {

customKey = customKeypad.getKey ();

hloov (customKey) {

rooj plaub '0' … '9':

lcd.setCursor (0, 0);

thawj = thawj * 10 + (customKey - '0');

lcd.print (thawj);

pos ++;

tawg;

cas '+':

thawj = (tag nrho! = 0? tag nrho: thawj);

lcd.setCursor (posit, 0);

lcd.print ("+");

pos ++;

thib ob = SecondNumber ();

tag nrho = thawj + thib ob;

lcd.setCursor (1, 1);

lcd.print (tag nrho);

thawj = 0, thib ob = 0;

posit = 0;

tawg;

cas '-':

thawj = (tag nrho! = 0? tag nrho: thawj);

lcd.setCursor (posit, 0);

lcd.print ("-");

pos ++;

thib ob = SecondNumber ();

tag nrho = thawj - thib ob;

lcd.setCursor (1, 1);

lcd.print (tag nrho);

thawj = 0, thib ob = 0;

posit = 0;

tawg;

cas '*':

thawj = (tag nrho! = 0? tag nrho: thawj);

lcd.setCursor (posit, 0);

lcd.print ("*");

pos ++;

thib ob = SecondNumber ();

tag nrho = thawj * thib ob;

lcd.setCursor (1, 1);

lcd.print (tag nrho);

thawj = 0, thib ob = 0;

posit = 0;

tawg;

rooj plaub '/':

thawj = (tag nrho! = 0? tag nrho: thawj);

lcd.setCursor (posit, 0);

lcd.print ("/");

pos ++;

thib ob = SecondNumber (); lcd.setCursor (1, 1);

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

lcd.print (tag nrho);

thawj = 0, thib ob = 0;

posit = 0;

tawg;

cas 'C':

tag nrho = 0;

thawj = 0;

thib ob = 0;

posit = 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 (posit, 0);

lcd.print (thib ob); }

yog (customKey == 'C') {

tag nrho = 0;

thawj = 0;

thib ob = 0;

posit = 0;

lcd.clear ();

tawg; }

yog (customKey == '=') {

lcd.setCursor (0, 1);

lcd.print ("=");

posit = tag nrho;

lcd.clear ();

lcd.setCursor (0, 1);

lcd.print ("=");

tawg; }

}

rov qab thib ob;}

Kauj Ruam 8: Qhov tshwm sim

Qhov tshwm sim
Qhov tshwm sim
Qhov tshwm sim
Qhov tshwm sim

Kuv vam tias koj txhua tus nyiam qhov kev qhia no. Ua tsaug rau koj nyeem!

Saim.

Pom zoo: