2. บทเรียนหุ่นยนต์พื้นฐาน

2.7 ควบคุมหุ่นยนต์แบบไร้สายด้วย Joystick

1. เป้าหมายการเรียนรู้ 📌

ใช้จอยสติ๊ก micro:bit Joystick:bit V2 เพื่อควบคุม Cutebot

2. สิ่งที่ต้องเตรียม

ชุดหุ่นยนต์ Cutebot

จอยสติ๊ก micro:bit Joystick:bit V2 (พร้อมบอร์ด micro:bit)

3. การเตรียมโปรแกรม

    • เปิดเบราว์เซอร์ Google Chrome แล้วไปที่เว็บไซต์ makecode.microbit.org
    • สร้างโปรเจกต์ใหม่และตั้งชื่อตามที่ต้องการ เช่น “cutebot7”
    • เพิ่มส่วนขยาย (Extension) ของ Cutebot โดยคลิกที่ “Extensions” แล้วค้นหา “Cutebot”
    • เพิ่มส่วนขยาย (Extension) ของ Joystickbit โดยคลิกที่ “Extensions” แล้วค้นหา “Joystickbit”

4. โค้ดตัวอย่าง 

โค้ดฝั่งหุ่นยนต์

โค้ดฝั่งจอยสติ๊ก

Select the fields to be shown. Others will be hidden. Drag and drop to rearrange the order.
  • Image
  • SKU
  • Rating
  • Price
  • Stock
  • Availability
  • Add to cart
  • Description
  • Content
  • Weight
  • Dimensions
  • Additional information
Click outside to hide the comparison bar
Compare