Cov txheej txheem:

Hniav Txhuam Timer: 4 Kauj Ruam
Hniav Txhuam Timer: 4 Kauj Ruam

Video: Hniav Txhuam Timer: 4 Kauj Ruam

Video: Hniav Txhuam Timer: 4 Kauj Ruam
Video: Saib Mis paub Poj niam (hluas nkauj) tus yam ntxwv lub siab 2024, Hlis ntuj nqeg
Anonim
Hniav Txhuam Timer
Hniav Txhuam Timer

lub tswv yim yog los tsim 2 tus neeg timer rau txhuam hniav

rau qhov no, Kuv siv microbit V1.

Nws pab kuv cov menyuam txhuam lawv cov hniav rau lub sijhawm pom zoo.

Yog tias koj muaj menyuam thiab micr: me ntsis thiab koj xav kom lawv muaj cov hniav huv; tsis txhob ua siab deb los luam kuv cov lus qhia.

Khoom siv:

1 micro: ntsis V1 version

1 lub khoos phis tawj uas muaj internet siv rau makeCode

tas li xwb

Kauj ruam 1: Code Variables

Code Hloov
Code Hloov

lub tswv yim yog tso cai rau 2 tus neeg siv lub microbit txawm tias lawv tsis tuaj txog hauv chav dej tib lub sijhawm.

Lub hom phiaj yog tso cai micro: me ntsis ua 2 qhov ua yeeb yaj kiab ntawm tib lub vijtsam.

Rau qhov ntawd, peb yuav siv daim nplaub tshev LED.

1/ thaum menyuam 1 tuaj txog, nws thawb lub khawm A lossis B thiab kev ua kom muaj zog pib rau 3 feeb

2/ thaum menyuam 2 tuaj txog, nws thawb lub pob thib ob thiab cov duab ua thib ob pib rau 3 feeb ib yam.

yog li peb yuav tsum tsim 2 qhov sib txawv sib txawv (Timer thiab Timer 2)

Kauj Ruam 2: Txhuam Txhuam Txhuam

Txhuam txhuam hniav
Txhuam txhuam hniav

Vim qhov tseeb cov menyuam tuaj yeem tuaj txog sib cais, peb yuav tsum kos 2 qhov sib txawv ntawm cov tsiaj ntawv ntawm tib lub micro: me ntsis.

Yog li, peb tsis tuaj yeem siv daim ntawv "yooj yim" los tsim cov animation.

Peb yuav tsum siv daim nplaub tshev LED ntawm daim ntawv thov MakeCode thiab kos tus txhuam hniav pixel los ntawm pixel.

Kauj Ruam 3: Txuag Koj Cov Roj Teeb

Txuag Koj Cov Roj Teeb
Txuag Koj Cov Roj Teeb

nyob rau hauv lub hom phiaj kom txuag koj lub roj teeb, micro: me ntsis yuav tsum tso teeb pom kev zoo LED thaum menyuam yaus ploj mus.

Raws li qhov tsim nyog, koj yuav tsum kaw qhov screen ntawm qhov kawg ntawm lub loops.

Kauj Ruam 4: Txhuam Koj Cov Hniav

tam sim no koj tuaj yeem txaus siab rau micro: me ntsis thiab xyuas kom muaj cov hniav zoo;-)

Pom zoo: