
สารบัญ:
- ขั้นตอนที่ 1:
- ขั้นตอนที่ 2:
- ขั้นตอนที่ 3:
- ขั้นตอนที่ 4:
- ขั้นตอนที่ 5:
- ขั้นตอนที่ 6:
- ขั้นตอนที่ 7:
- ขั้นตอนที่ 8:
- ขั้นตอนที่ 9:
- ขั้นตอนที่ 10:
- ขั้นตอนที่ 11:
- ขั้นตอนที่ 12:
- ขั้นตอนที่ 13:
- ขั้นตอนที่ 14:
- ขั้นตอนที่ 15:
- ขั้นตอนที่ 16:
- ขั้นตอนที่ 17:
- ขั้นตอนที่ 18:
- ขั้นตอนที่ 19:
- ขั้นตอนที่ 20:
- ขั้นตอนที่ 21:
- ขั้นตอนที่ 22:
- ขั้นตอนที่ 23:
- ขั้นตอนที่ 24:
- ขั้นตอนที่ 25:
- ขั้นตอนที่ 26:
- ขั้นตอนที่ 27:
- ขั้นตอนที่ 28:
- ขั้นตอนที่ 29: ขั้นตอนที่ 20: นี่คือคำแนะนำวิดีโอหากคุณต้องการ!:)
2025 ผู้เขียน: John Day | [email protected]. แก้ไขล่าสุด: 2025-01-23 15:12

เราจะตั้งโปรแกรมโซนาร์ของวอลเตอร์
ขั้นตอนที่ 1:
วิดีโอกวดวิชานี้ทำตามขั้นตอนที่สอนได้
ขั้นตอนที่ 2:

เราจะแก้ไขรหัสไมโครบอทของวอลเตอร์เพื่อให้มีโซนาร์ที่ใช้งานได้
ขั้นตอนที่ 3:

เปิดแท็บอินพุตและเลือกคำสั่ง On Button Press ที่ฉันไฮไลต์ไว้
ขั้นตอนที่ 4:



เราต้องการ 2 คำสั่งเหล่านี้ อย่าลืมเปลี่ยนปุ่มใดปุ่มหนึ่งเป็น B และปล่อยให้อีกปุ่มหนึ่งอยู่บน A
ขั้นตอนที่ 5:

เปิดแท็บตัวแปรแล้วคลิกสร้างตัวแปร
ขั้นตอนที่ 6:



เมื่อคุณคลิกที่สร้างตัวแปร ระบบจะขอให้คุณตั้งชื่อเพื่อให้ง่าย ๆ เพียงแค่ตั้งชื่อให้ปุ่ม จากนั้นกด ตกลง จากนั้นคุณจะเห็น 3 คำสั่งปรากฏขึ้น
ขั้นตอนที่ 7:


ลากคำสั่ง Set Button ไปที่คำสั่ง On Button ตามที่ฉันแสดง
ขั้นตอนที่ 8:

เปิดแท็บลอจิกแล้วหยิบคำสั่งที่ฉันเน้นไว้
ขั้นตอนที่ 9:


แทนที่คำสั่งปุ่มด้วยคำสั่งใหม่
ขั้นตอนที่ 10:



เลือกตัวแปรของปุ่มและแทนที่ 0 ตัวแรก คุณอาจต้องลองสองสามครั้งเพื่อให้สแนปไปยังจุดหยุดที่ถูกต้อง
ขั้นตอนที่ 11:



เปิดแท็บตัวแปรและเราจะสร้างตัวแปรใหม่ชื่อ Sonar
ขั้นตอนที่ 12:



ไปที่ส่วนขยายและค้นหาโซนาร์แล้วเลือกอันที่ฉันไฮไลต์ไว้
ขั้นตอนที่ 13:


หยิบชุดคำสั่ง Sonar แล้วลากไปใต้คำสั่ง if
ขั้นตอนที่ 14:



ลากคำสั่ง Sonar ไปที่ตัวแปรโซนาร์
ขั้นตอนที่ 15:




ต่อไปเราจะเปลี่ยนตัวแปรในคำสั่งโซนาร์
ขั้นตอนที่ 16:


เปิดแท็บลอจิกแล้วลากคำสั่ง if else ใต้คำสั่ง Sonar
ขั้นตอนที่ 17:



เปิดแท็บตรรกะแล้วลากคำสั่งเพื่อแทนที่คำสั่งจริง
ขั้นตอนที่ 18:



ลาก Sonar Variable และแทนที่ข้อความจริง
ขั้นตอนที่ 19:


ลากคำสั่งเซอร์โวต่อเนื่องภายใต้คำสั่ง if ที่สอง
ขั้นตอนที่ 20:




คลิกที่ขั้นสูงแล้วเปิดแท็บการควบคุม จากนั้นลากไปไว้ใต้คำสั่งเซอร์โวต่อเนื่อง 2 คำสั่งแรก
ขั้นตอนที่ 21:



ลากชุดคำสั่งต่อเนื่องชุดที่สองภายใต้คำสั่งรอ
ขั้นตอนที่ 22:



เพิ่มเวลารอภายใต้ชุดคำสั่งเซอร์โวต่อเนื่องชุดที่สอง จากนั้นลากชุดคำสั่งต่อเนื่องชุดที่สามภายใต้คำสั่ง else แรก
ขั้นตอนที่ 23:




ลบคำสั่งอื่นๆ และปล่อยให้คำสั่ง else if และคำสั่ง stop servo
ขั้นตอนที่ 24:

ลากคำสั่งหยุดเซอร์โวภายใต้คำสั่ง else if
ขั้นตอนที่ 25:


เปิดแท็บลอจิกแล้วลากคำสั่งไปที่ช่อง
ขั้นตอนที่ 26:


ลากตัวแปรปุ่มเพื่อแทนที่ 0
ขั้นตอนที่ 27:




ตอนนี้กำลังจะเปลี่ยนตัวแปรบางตัว
ขั้นตอนที่ 28:

นี่คือลักษณะของรหัสที่เสร็จแล้ว
แนะนำ:
MIDI Sonar "Theremin": 10 ขั้นตอน (พร้อมรูปภาพ)

MIDI Sonar "Theremin": นี่คือเครื่องดนตรีที่ใช้เซ็นเซอร์วัดระยะโซนาร์สองตัวเพื่อควบคุมระดับเสียงและคุณภาพของโน้ต ไม่ใช่ Theremin แน่นอน แต่เป็น "Theremin" ได้กลายเป็นคำศัพท์ทั่วไปสำหรับเครื่องดนตรีที่เล่นโดยการโบกมือ
Arduino Ultrasonic Scanning SoNAR ที่อัปเกรดแล้ว: 5 ขั้นตอน

Arduino Ultrasonic Scanning SoNAR ที่อัปเกรดแล้ว: ฉันกำลังอัปเกรดโครงการสแกนอัลตราโซนิก SONAR ฉันต้องการเพิ่มปุ่มบางปุ่มบนหน้าจอการประมวลผลที่จะเปลี่ยน Azimuth, Bearing, Range, Speed และ Tilt สำหรับเซอร์โวตัวที่สอง ฉันเริ่มต้นด้วยโครงการ Lucky Larry ฉันเชื่อว่าเขาเป็นต้นกำเนิด
Walter the Microbot Bot การเคลื่อนไหวขั้นพื้นฐาน: 26 ขั้นตอน

Walter the Microbot Bot Basic Movement: เราจะเขียนโปรแกรม Walter the Micro:Bot
ถังขยะ BT Line Drawing Bot - My Bot: 13 ขั้นตอน (พร้อมรูปภาพ)

Trash Built BT Line Drawing Bot - My Bot: Hai เพื่อน ๆ หลังจากห่างหายไปนานประมาณ 6 เดือน ฉันมากับโปรเจ็กต์ใหม่ จนกว่าจะเสร็จสิ้น Cute Drawing Buddy V1 หุ่นยนต์ SCARA - Arduino ฉันวางแผนสำหรับบอทวาดรูปอีกตัวหนึ่ง เป้าหมายหลักคือการครอบคลุมพื้นที่ขนาดใหญ่สำหรับการวาดภาพ แขนหุ่นยนต์คงที่ดังนั้นค
WALTER (การประกวด Arduino): 5 ขั้นตอน (พร้อมรูปภาพ)

WALTER (การประกวด Arduino): กรุณาโหวตให้ฉันสำหรับ Arduino Contest 2017[โปรดแก้ตัวภาษาอังกฤษของฉัน] ฉันชอบการตั้งค่ายอดนิยมของแมลง Arduino 2 ตัวบน youtube เมื่อฉันดูมัน ฉันจำได้เสมอว่าหุ่นยนต์ BEAM ทำอะไรมานานก่อนที่การตั้งค่านั้นจะกลายเป็นเรื่องโปรด พี