Mundarija:

Uolter Sonar Bot: 29 qadam
Uolter Sonar Bot: 29 qadam

Video: Uolter Sonar Bot: 29 qadam

Video: Uolter Sonar Bot: 29 qadam
Video: По следам древней цивилизации? 🗿 Что, если мы ошиблись в своем прошлом? 2024, Noyabr
Anonim
Uolter Sonar Bot
Uolter Sonar Bot

Biz Valterning Sonar dasturini tuzamiz

1 -qadam:

Bu ko'rsatmali qadamlarni bajaradigan video darslik.

2 -qadam:

Rasm
Rasm

Biz Walter microbot kodini o'zgartiramiz, shunda biz ishlaydigan sonarga ega bo'lamiz.

3 -qadam:

Rasm
Rasm

Kirish yorlig'ini oching va men ta'kidlagan tugmani bosish buyrug'ini tanlang.

4 -qadam:

Rasm
Rasm
Rasm
Rasm
Rasm
Rasm

Bizga ikkita buyruq kerak bo'ladi, tugmalardan birini B ga o'zgartirganingizga ishonch hosil qiling, ikkinchisini A da qoldiring.

5 -qadam:

Rasm
Rasm

O'zgaruvchilar yorlig'ini oching va o'zgaruvchini yaratish -ni bosing

6 -qadam:

Rasm
Rasm
Rasm
Rasm
Rasm
Rasm

O'zgaruvchini yaratish tugmachasini bosganingizda, u sizdan oddiy ishlarni bajarish uchun uni nomlashni so'raydi, faqat tugmachani nomlang va keyin ok tugmasini bosing, shunda siz 3 ta buyruq paydo bo'ladi.

7 -qadam:

Rasm
Rasm
Rasm
Rasm

O'rnatish tugmachasi buyrug'ini men ko'rsatgandek On Button buyrug'iga torting.

8 -qadam:

Rasm
Rasm

Mantiq yorlig'ini oching va men ko'rsatgan buyruqni oling.

9 -qadam:

Rasm
Rasm
Rasm
Rasm

Tugma buyrug'ini yangi buyruq bilan almashtiring.

10 -qadam:

Rasm
Rasm
Rasm
Rasm
Rasm
Rasm

Tugma o'zgaruvchisini tanlang va birinchi 0 -ni almashtiring. Siz uni bir necha marta to'g'ri to'xtash joyiga qo'yishingiz mumkin.

11 -qadam:

Rasm
Rasm
Rasm
Rasm
Rasm
Rasm

O'zgaruvchilar yorlig'ini oching va biz Sonar nomli yangi o'zgaruvchini yaratamiz.

12 -qadam:

Rasm
Rasm
Rasm
Rasm
Rasm
Rasm

Kengaytmalarga o'ting va sonarni qidiring va men ta'kidlagan birini tanlang.

13 -qadam:

Rasm
Rasm
Rasm
Rasm

O'rnatilgan Sonar buyrug'ini oling va if iborasi ostiga torting.

14 -qadam:

Rasm
Rasm
Rasm
Rasm
Rasm
Rasm

Sonar buyrug'ini sonar o'zgaruvchisiga torting.

15 -qadam:

Rasm
Rasm
Rasm
Rasm
Rasm
Rasm
Rasm
Rasm

Keyin biz sonar buyrug'idagi o'zgaruvchilarni o'zgartiramiz.

16 -qadam:

Rasm
Rasm
Rasm
Rasm

Mantiq yorlig'ini oching va Sonar buyrug'i ostida if else buyrug'ini torting.

17 -qadam:

Rasm
Rasm
Rasm
Rasm
Rasm
Rasm

Mantiq yorlig'ini oching va haqiqiy so'zni almashtirish uchun buyruqni harakatlantiring.

18 -qadam:

Rasm
Rasm
Rasm
Rasm
Rasm
Rasm

Sonar o'zgaruvchisini torting va haqiqiy statmentni almashtiring.

19 -qadam:

Rasm
Rasm
Rasm
Rasm

Ikkinchi if iborasi ostida uzluksiz servo buyrug'ini torting.

20 -qadam:

Rasm
Rasm
Rasm
Rasm
Rasm
Rasm
Rasm
Rasm

Kengaytirilgan tugmachasini bosing va keyin boshqaruv yorlig'ini oching. Keyin uni dastlabki 2 ta uzluksiz servo buyruqlar ostiga torting.

21 -qadam:

Rasm
Rasm
Rasm
Rasm
Rasm
Rasm

Ikkinchi buyruqlar to'plamini kutish buyrug'i ostiga torting.

22 -qadam:

Rasm
Rasm
Rasm
Rasm
Rasm
Rasm

Ikkinchi uzluksiz servo buyrug'i ostida kutish vaqtini qo'shing. Keyin uchinchi doimiy buyruqlar to'plamini boshqa birinchi buyruq ostiga torting.

23 -qadam:

Rasm
Rasm
Rasm
Rasm
Rasm
Rasm
Rasm
Rasm

Boshqa bayonotlarni o'chiring va if if va stop servo buyruqlarini qoldiring.

24 -qadam:

Rasm
Rasm

Else if iborasi ostida servo stop buyrug'ini torting.

25 -qadam:

Rasm
Rasm
Rasm
Rasm

Mantiq yorlig'ini oching va buyruqni uyaga torting.

26 -qadam:

Rasm
Rasm
Rasm
Rasm

0 -ni almashtirish uchun tugma o'zgaruvchisini torting

27 -qadam:

Rasm
Rasm
Rasm
Rasm
Rasm
Rasm
Rasm
Rasm

Endi ba'zi o'zgaruvchilarni o'zgartirmoqchi edim.

28 -qadam:

Rasm
Rasm

Tayyor kod shunday ko'rinishi kerak.

Tavsiya: