Skip to content

Instantly share code, notes, and snippets.

@dvsseed
Created October 11, 2017 23:02
Show Gist options
  • Save dvsseed/df7c6b542dc95ba227fa5c4dc642df2d to your computer and use it in GitHub Desktop.
Save dvsseed/df7c6b542dc95ba227fa5c4dc642df2d to your computer and use it in GitHub Desktop.
scratch extension for microbit with Chinese
{
"extensionName": "BBC micro:bit Extension",
"extensionPort": 54321,
"url": "https://github.com/",
"blockSpecs": [
["r", "加速度感應值(mg) x", "acc_x"],
["r", "加速度感應值(mg) y", "acc_y"],
["r", "加速度感應值(mg) z", "acc_z"],
["", "", ""],
["r", "方位感應值(°) x", "comp_x"],
["r", "方位感應值(°) y", "comp_y"],
["r", "方位感應值(°) z", "comp_z"],
["", "", ""],
["r", "溫度感應值(°C)", "temp_t"],
["", "", ""],
["b", "A鍵被按下?", "btn_a"],
["b", "B鍵被按下?", "btn_b"],
["", "", ""],
[" ", "%m.status : 數位信號寫入 腳位 %m.inputs 成 %m.high_low", "show_pin", "off", "P0", "0"],
["", "", ""],
[" ", "%m.status : 播放旋律 %m.musics 重複 %m.bools", "play_music", "off", "music.BIRTHDAY", "false"],
[" ", "關閉 音樂", "stop_music"],
["r", "stop", "get_stop"],
["", "", ""],
["r", "顯示 圖示 %m.imgs", "show_image", "Image.HAPPY"],
[" ", "%m.status : 顯示 文字 %s", "set_led", "off", "Hello, World!"],
["r", "led", "get_led"],
[" ", "清除 屏幕", "off_led"],
["r", "clear", "get_clear"],
["", "", ""],
[" ", "重置 microbit", "reset_mb"],
["r", "reset", "get_reset"],
],
"menus": {
"status": ["on", "off"],
"inputs": ["P0", "P1", "P2"],
"high_low": ["0", "1"],
"bools": ["true", "false"],
"musics": ["music.DADADADUM", "music.ENTERTAINER", "music.PRELUDE", "music.ODE", "music.NYAN", "music.RINGTONE", "music.FUNK", "music.BLUES", "music.BIRTHDAY", "music.WEDDING", "music.FUNERAL", "music.PUNCHLINE", "music.PYTHON", "music.BADDY", "music.JUMP_UP", "music.JUMP_DOWN", "music.POWER_UP", "music.POWER_DOWN"],
"imgs": ["Image.HEART", "Image.HAPPY", "Image.SMILE", "Image.ANGRY", "Image.YES", "Image.NO", "Image.CLOCK12", "Image.CLOCK11", "Image.CLOCK10", "Image.CLOCK9", "Image.CLOCK8", "Image.CLOCK7", "Image.CLOCK6", "Image.CLOCK5", "Image.CLOCK4", "Image.CLOCK3", "Image.CLOCK2", "Image.CLOCK1", "Image.ALL_CLOCKS", "Image.ARROW_N", "Image.ARROW_NE", "Image.ARROW_E", "Image.ARROW_SE", "Image.ARROW_S", "Image.ARROW_SW", "Image.ARROW_W", "Image.ARROW_NW", "Image.ALL_ARROWS"],
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment