กดปุ่มบนมือถือ → หุ่นยนต์ micro:bit ขับได้ทันที ผ่าน Bluetooth ฟรี ไม่มีโฆษณา
แอปส่ง BLE UART text จบด้วย \n — micro:bit รับแล้วทำอะไรก็ได้ตาม logic ที่ออกแบบเอง
// ── Receive commands ───────────────────────────────── bluetooth.onUartDataReceived("\n", function () { let cmd = bluetooth.uartReadUntil("\n").trim() if (cmd == lastCommand) { return } // กัน duplicate lastCommand = cmd if (cmd == "UP") { basic.showArrow(ArrowNames.North) } else if (cmd == "DOWN") { basic.showArrow(ArrowNames.South) } else if (cmd == "LEFT") { basic.showArrow(ArrowNames.West) } else if (cmd == "RIGHT") { basic.showArrow(ArrowNames.East) } else if (cmd == "STOP") { basic.clearScreen() } else if (cmd == "A") { basic.showIcon(IconNames.Heart) } else { basic.clearScreen() } }) let lastCommand = "" // ── Startup ────────────────────────────────────────── bluetooth.startUartService() basic.showIcon(IconNames.Ghost) basic.pause(500) basic.clearScreen()
⚙️ Extensions → Bluetooth → เลือก No Pairing Required → Save
Copy โค้ด → วางใน MakeCode (JavaScript mode) → Download .hex → ลาก drop ลง drive MICROBIT — ไม่ต้องเขียนโค้ด BLE เอง
เหมาะสำหรับครูที่ต้องการเริ่มใช้งานได้ทันที
"A\n", "B\n", "C\n", "D\n" แก้ไขโค้ดใน template เพื่อทำ action ที่ต้องการได้ไม่ต้องพิมพ์ URL ไม่ต้องค้นหาใน Play Store แค่ฉาย QR Code บนโปรเจกเตอร์ นักเรียนทั้งห้องสแกนและดาวน์โหลดได้พร้อมกันทันที