Cov txheej txheem:

Felt Micro: Me ntsis Lub Npe Cim - Paj Ntaub + Coding !: 6 Cov Kauj Ruam (nrog Duab)
Felt Micro: Me ntsis Lub Npe Cim - Paj Ntaub + Coding !: 6 Cov Kauj Ruam (nrog Duab)

Video: Felt Micro: Me ntsis Lub Npe Cim - Paj Ntaub + Coding !: 6 Cov Kauj Ruam (nrog Duab)

Video: Felt Micro: Me ntsis Lub Npe Cim - Paj Ntaub + Coding !: 6 Cov Kauj Ruam (nrog Duab)
Video: Data Science with Python! An Introduction to Polars 2024, Kaum ib hlis
Anonim
Felt Micro: Me ntsis Lub Npe Cim - Paj Ntaub + Coding!
Felt Micro: Me ntsis Lub Npe Cim - Paj Ntaub + Coding!

Qhov tseem ceeb tshaj plaws uas koj xav tau ntawm lub chaw pw thaum caij ntuj sov yog lub npe txias!

Cov lus qhia no yuav qhia koj yuav ua li cas rau phiaj xwm BBC micro: me ntsis los qhia txhua tus neeg koj yog leej twg, tom qab ntawd tsim thiab hloov kho tus cim npe kom muaj nws.

Cov Kauj Ruam 1 & 2 yog hais txog kev tsim lub micro: ntsis-koj yuav tsum xaiv seb puas yuav siv cov ntawv raws MicroPython (Kauj Ruam 1) lossis rub-thiab-poob MakeCode (Kauj Ruam 2).

Kauj Ruam 3-6 yog hais txog kev ua daim paib - koj yuav tsum xaiv seb yuav siv cov kua nplaum (Kauj Ruam 4) lossis xov (Kauj Ruam 5) los muab tso ua ke.

Cov dej num no yog ib feem ntawm Hnub 1 ntawm Robocamp 2019, peb lub lim tiam-ntev neeg hlau nyob rau lub caij ntuj sov rau cov tub ntxhais hluas hnub nyoog 10-13.

Khoom siv

Kauj Ruam 1-2 (Programming):

  • BBC micro: me ntsis
  • USB rau microUSB cov ntaub ntawv cable
  • Khoos phis tawj

Kauj Ruam 3-6 (Felt Badge):

  • Xav
  • Kub kua nplaum phom
  • micro: me ntsis roj teeb pob
  • (yeem) laser txiav
  • (xaiv tau) luam tawm cov qauv
  • (yeem) PVA kua nplaum
  • (xaiv tau) paj ntaub xov, koob & txiab

Kauj Ruam 1: Ua Haujlwm BBC Micro: me ntsis - Siv MicroPython

Programming BBC Micro: me ntsis - Siv MicroPython
Programming BBC Micro: me ntsis - Siv MicroPython

Yog tias koj xav siv MakeCode hloov chaw, hla cov kauj ruam no

Koj muaj qee qhov kev xaiv rau kev sau MicroPython code rau koj micro: ntsis:

  • Mu, uas koj tuaj yeem rub tawm thiab teeb tsa los ntawm no:
  • Tus kho online, uas koj tuaj yeem pom ntawm no:
  • Edublocks, tus kws tshuaj xyuas online raws tus thaiv, uas koj tuaj yeem pom ntawm no:

Cov lus qhia no xav tias koj siv Mu

Qhib Mu, thiab ntsaws koj lub micro: ntsis rau hauv koj lub computer. Mu yuav tsum lees paub tias koj tab tom siv micro: ntsis thiab xaiv micro: ntsis 'Hom', tab sis yog nws tsis ua, hloov nws tus kheej (Duab #1).

Ntaus cov kab no ntawm cov cai rau hauv Mu:

los ntawm microbit ntshuam *

thaum Muaj Tseeb: display.scroll ('Nyob Zoo')

Tam sim no nyem qhov 'Flash' khawm los ntawm Mu's toolbar, kom xa koj cov cai tshiab rau micro: me ntsis.

Qhov no yuav tsis ua haujlwm tshwj tsis yog lub micro: ntsis tau ntsaws

Lub teeb daj nyob tom qab ntawm lub micro: me ntsis yuav pib nyem. Thaum nws ua tiav, koj cov cai tau raug xa mus.

Tam sim no koj yuav tsum muaj cov lus 'Nyob Zoo' scrolling hla koj lub micro: ntsis lub vijtsam!

Qhov no yuav txuas ntxiv mus ib txhis, vim 'thaum Muaj Tseeb' yog rov ua dua. Qhov kev nkag nkag (kab rov tav nrug) ua ntej 'display.scroll' qhia tias kab no nyob sab hauv lub voj mus ib txhis.

Yog tias muaj qhov ua yuam kev hauv koj cov cai, micro: me ntsis yuav qhia koj cov lus yuam kev es tsis yog tus lej koj xav tau!

Sim nyeem cov lus no kom pom tus lej xov tooj qhov yuam kev nyob, tom qab ntawd debug koj cov cai.

Kos:

  • sau ntawv
  • Cov Ntawv Loj
  • cov xim:

    indentation

Kho koj cov cai kom tsis txhob scrolling 'Nyob zoo', nws scrolls koj lub npe.

Hint: Cov lus kom muab tso tawm yuav tsum yog sab hauv ob kab zauv thiab cov cim hais lus/kab lus sib dhos!

Tam sim no nthuav koj cov cai

Hauv qab cov cai koj tau sau, khaws qhov kev nkag mus kom koj tus lej tshiab nyob hauv lub voj thiab, ntxiv cov kab no:

display.show (Image. HAPPY)

tsaug zog (500)

'pw tsaug zog' yog qhov tseem ceeb, nws nres lub voj los ntawm kev rov ua nrawm dua. Yog tsis muaj nws, koj yuav tsis tuaj yeem pom daim duab, vim nws yuav ploj tam sim ntawd.

Thaum koj tau txais nws ua haujlwm, sim qee lwm cov duab. Kuv tus kheej nyiam yog DUCK!

Ib daim ntawv teev cov duab muaj nyob ntawm no:

Txhawm rau kom tau txais qee lub tswv yim txhawm rau nthuav koj cov cai, piv txwv li siv lub micro: ntsis cov nyees khawm, rub cov ntawv pabcuam txuas nrog. Pib nrog Cov Lus Qhia & Cov Ntawv Tso Tawm, tom qab ntawd txav mus rau cov phiaj xwm phiaj xwm.

Cov kauj ruam tom ntej rov ua cov lus qhia no rau MakeCode Editor. Hla cov kauj ruam no, thiab txav mus rau Kauj Ruam 3 kom ua rau koj lub npe zoo.

Pom zoo: