โฆษณา

STEM Education ด้วย Social Media by kruweerachat

Tuesday, December 4, 2018

Micro: Maqueen micro:bit Robot Platform

วันนี้ มาลองเล่น   Micro: Maqueen micro:bit Robot Platform  กันนะครับ เป็นหุ่นเล็กๆ ราคาถูกที่สามารถโปรแกรมได้ทั้งแบบ microbit block  หรือ scrath 3.0 และ ด้วยภาษา python

ตัวอย่างการโปรแกรมโดยใช้ makecode.com ภาษาบล็อกแบบลากวาง ง่ายๆ เหมาะสำหรับชั้นประถมและเริ่มต้นครับ นอกจากนี้ยังสามารถเชื่อมต่อโปรแกรมกับ Scratch 3.0 ได้ครับ ซึ่งทำให้เป็นเรื่องงานในการหาคู่มือครับ ซึ่งปัจจุบันสื่อการเขียนโปรแกรม micro bit ใน youtube และใน เว็บไซต์ มีเยอะมากครับ สามารถค้นหาได้ง่ายๆครับ 

Import the Makecode Graphical Library




  1. คลิ๊ก link: makecode.microbit.org, เพื่อเปิดการเขียนโปรแกรมผ่านเว็บ
  2. Import the library:โดยก็อปปี้: https://github.com/jhlucky/maqueen ลงในส่วน extention ดังรูป




ตัวอย่างโปรแกรม 

Makecode Programming Example

Motor Control


Learning Target: Mastering the basic method of motor control.
Effect: The car forward 1 second, right turn 1 second, left turn 1 second, back 1 second, back and right turn 1 second.
คัดลอกโค๊ตโปรแกรมที่นี่  Link: https://makecode.microbit.org/_2Cc9gM5P5aDs 

2.RGB Breathing Ambient Light
Learning Target: Learn the basic way of using ambient light.
Effect: The RGB ambient light at the bottom of the Maqueen shows a variety of colors and presents a gradient effect.





คัดลอกโค๊ตโปรแกรมที่นี่ Link: https://makecode.microbit.org/_WkgPLpAotP3f 
Screenshot of Makecode Graphical Program:

3.LED Light Flash
Learning Target: Learn the using way of LED light and buzzer.
Effect: The left and right LED lights flash alternately, and the buzzer emits two different tone frequencies at intervals of 500 milliseconds.

คัดลอกโค๊ตโปรแกรมที่นี่ Link :https://makecode.microbit.org/_6gKRm1RVsDxY 


Screenshot of Makecode Graphical Program:



4.Read Ultrasonic Distance
Learning Target: Learn to read the distance of ultrasound, so that later can be flexible use of these data.
Effect: The ultrasonic detects the obstruction in front and the distance will be displayed on the dot-matrix screen in centimeters.

คัดลอกโค๊ตโปรแกรมที่นี่  Link: https://makecode.microbit.org/_4gi4Dj7yTWgK
Screenshot of Makecode Graphical Program:

5.Line-tracking
เป็นการเขียนโปรแกรมเดินตามเส้นครับ
Effect: The car is running along the black line.
คัดลอกโค๊ตโปรแกรมที่นี่ Link: https://makecode.microbit.org/_1VzX7LLAC3im 
Screenshot of Makecode Graphical Program:


6.Ultrasonic Obstacle-avoiding
Effect: Ultrasonic detects the distance between the car and the obstacle in front of it. If the distance is less than 35cm, the car will randomly choose to turn left or right to avoid obstacles.
Fittings: SR04 Ultrasonic Module x 1 or SR04-P Ultrasonic Module x 1

Makecode Program Link: https://makecode.microbit.org/_Fa4Ef3DwyXW7 
Screenshot of Makecode Graphical Program:


7.Light-operated Sprite
Effect: The car does not move in the darker light, and as the flashlight illuminates the LED, the vehicle's forward speed begins to increase as the intensity of the light increases.
Makecode Program Link: https://makecode.microbit.org/_fi6DWjCKeM9v 
Screenshot of Makecode Graphical Program:




รู้จัก  Maqueen micro bit Robot
////////////////////////////////////////////////////////////////////////////









///////////////////////////////////////////////////////////////////////////////

เริ่มต้นเรียนรู้ micro bit

No comments:

Post a Comment

like