Important Announcement
PubHTML5 Scheduled Server Maintenance on (GMT) Sunday, June 26th, 2:00 am - 8:00 am.
PubHTML5 site will be inoperative during the times indicated!

Home Explore การเขียนโปรแกรมmakecode Programming

การเขียนโปรแกรมmakecode Programming

Published by piknanthida55, 2022-01-05 02:48:24

Description: การเขียนโปรแกรมmakecode Programming

Search

Read the Text Version

อารเ์ รยแ์ ละพอยเตอรA์ rray_Pointer การเขยี นโปรแกรมmakecode Programming เป้ หมาย:เพอ่ื เรยี นรพู ้ นื้ ฐานอารเ์ รยร์ ับคา่ เสยี ง ตวั โน๊ต ผลโปรแกรม:อารเ์ รยร์ ับคา่ เสยี งตวั โน๊ต อารเ์ รยเ์ ป็ นการรับคา่ มากกวา่ 1 ตวั เกบ็ ขอ้ มลู ทงั้ ตวั เลขและตวั อกั ษร ๑.เขา้ ไปทL่ี ink:https://makecode.microbit.org เพอื่ เขา้ หนา้ โปรแกรม makecode คลกิ เลอื ก new project จะไดห้ นา้ ตา่ งดงั รปู

๒. ใหค้ ลกิ ทiี่ con เลอื กExtensions หรอื กดAdvancedเลอื ก Extension ๓. คลกิ เลอื ก Teb variables เพอื่ ทำการ Add library variables เขา้ มาในโปรแกรม save list

๔. คลกิ เลอื ก Teb Array

๕. โคดควบคมุ Motor https://makecode.microbit.org/53011-15242-603 29-50263

อารเ์ รยร์ บั คา่ เสยี งตวั โนต๊ การเขยี นโปรแกรมmakecode Programming เป้ หมาย:เพอ่ื เรยี นรพู ้ นื้ ฐานอารเ์ รยแ์ ละพอยเตอร์ ผลโปรแกรม:เพอื่ ทายคำภาษาองั กฤษ ขนั้ ตอนการเขยี นโปรแกรม ๑เขา้ ไปที่ Link:https://makecode.microbit.orgเพอื่ เขา้ หนา้ โปรแกรม makecode คลกิ เลอื กnew project จะไดห้ นา้ ตา่ งดงั รปู

๒. ใหค้ ลกิ ทi่ี con เลอื กExtensions หรอื กดAdvancedเลอื ก Extension ๓. คลกิ เลอื ก Teb Variables เพอ่ื ทำการ Add library Variables เขา้ มาในโปรแกรม หลงั จากนัน้ ตงั้ ชอื่ วา่ เป็ น Array words ของคำศพั ท์ แลว้ เลอื ก Teb Array คำศพั ทก์ ดทค่ี ำสง่ั Text

๔. จากนัน้ ใสค่ ำศพั ทภ์ าษาองั กฤษใน Array ๕. โคดควบคมุ Motor https://makecode.microbit.org/86092-83938 -22985-05017

Input Music เมโลด3ี้ ป่ มุ A,B,A+B การเขยี นโปรแกรมmakecode Programming เป้ หมาย:เพอ่ื เรยี นรพู ้ นื้ ฐานInput Music เมโลด3ี้ ป่ มุ A,B,A+B ผลโปรแกรม:ป่ มุ A เกดิ เสยี งเมโลด้ี ป่ มุ B เกดิ เสยี งเมโลด้ี ป่ มุ A+B เกดิ เสยี งเมโลด้ี ขนั้ ตอนการเขยี นโปรแกรม ๑. เขา้ ไปทLี่ ink:https://makecode.microbit.org เพอ่ื เขา้ หนา้ โปรแกรม makecode คลกิ เลอื ก new project จะไดห้ นา้ ตา่ งดงั รปู

๒. ใหค้ ลกิ ทiี่ con เลอื กExtensions หรอื กดAdvancedเลอื ก Extension ๓. คลกิ เลอื ก Teb Input เพอ่ื ทำการ Add library Input เขา้ มา ในโปรแกรม โดยเลอื กทงั้ ป่ มุ A ,B และ A+B

๔. คลกิ ที่ ป่ มุ A จะมฟี ังกช์ นั เพม่ิ 3ป่ มุ ๕. เขา้ ไปทM่ี usic แลว้ กด play melody

๖. โคดควบคมุ Motor https://makecode.microbit.org/_29YPAiUhm4L6


Like this book? You can publish your book online for free in a few minutes!
Create your own flipbook