增加外接传感+调整显示内置图像

This commit is contained in:
Irene-Maxine
2025-03-24 19:10:24 +08:00
parent 5b48b2f5e5
commit 6b6ec621a3
5 changed files with 184 additions and 138 deletions

View File

@@ -721,128 +721,128 @@ export const mpython_display_line = {
}
};
export const mpython_pbm_image = {
init: function () {
this.jsonInit({
"colour": DISPLAY_ONBOARD_HUE,
"args0": [
{
"type": "field_label",
"name": "size_image",
"text": Blockly.Msg.MIXLY_MICROBIT_Built_in_image1
},
// export const mpython_pbm_image = {
// init: function () {
// this.jsonInit({
// "colour": DISPLAY_ONBOARD_HUE,
// "args0": [
// {
// "type": "field_label",
// "name": "size_image",
// "text": Blockly.Msg.MIXLY_MICROBIT_Built_in_image1
// },
{
"name": "path",
"options": [
["Heart", "Heart"],
["Angry", "Angry"],
["Bored", "Bored"],
["Confused", "Confused"],
["Happy", "Happy"],
["Paper", "Paper"],
["Rock", "Rock"],
["Sad", "Sad"],
["Scissors", "Scissors"],
["Silly", "Silly"],
["Sleep", "Sleep"],
["Small_heart", "Small_heart"],
["Small_paper", "Small_paper"],
["Small_rock", "Small_rock"],
["Small_scissors", "Small_scissors"],
["Smile", "Smile"],
["Surprise", "Surprise"],
["Wonderful", "Wonderful"],
["Eyes_Angry", "Eyes_Angry"],
["Awake", "Awake"],
["Black_eye", "Black_eye"],
["Bottom_left", "Bottom_left"],
["Bottom_right", "Bottom_right"],
["Crazy_1", "Crazy_1"],
["Crazy_2", "Crazy_2"],
["Disappointed", "Disappointed"],
["Dizzy", "Dizzy"],
["Down", "Down"],
["Evil", "Evil"],
["Hurt", "Hurt"],
["Knocked_out", "Knocked_out"],
["Love", "Love"],
["Middle_left", "Middle_left"],
["Middle_right", "Middle_right"],
["Neutral", "Neutral"],
["Nuclear", "Nuclear"],
["Pinch_left", "Pinch_left"],
["Pinch_middle", "Pinch_middle"],
["Pinch_right", "Pinch_right"],
["Tear", "Tear"],
["Tired_left", "Tired_left"],
["Tired_middle", "Tired_middle"],
["Tired_right", "Tired_right"],
["Toxic", "Toxic"],
["Up", "Up"],
["Winking", "Winking"],
["Accept", "Accept"],
["Backward", "Backward"],
["Decline", "Decline"],
["Forward", "Forward"],
["Left", "Left"],
["No_go", "No_go"],
["Question_mark", "Question_mark"],
["Right", "Right"],
["Stop_1", "Stop_1"],
["Stop_2", "Stop_2"],
["Thumbs_down", "Thumbs_down"],
["Thumbs_up", "Thumbs_up"],
["Warning", "Warning"],
["Bomb", "Bomb"],
["Boom", "Boom"],
["Fire", "Fire"],
["Flowers", "Flowers"],
["Forest", "Forest"],
["Lightning", "Lightning"],
["Light_off", "Light_off"],
["Light_on", "Light_on"],
["Night", "Night"],
["Pirate", "Pirate"],
["Snow", "Snow"],
["Target", "Target"],
["Bar_0", "Bar_0"],
["Bar_1", "Bar_1"],
["Bar_2", "Bar_2"],
["Bar_3", "Bar_3"],
["Bar_4", "Bar_4"],
["Dial_0", "Dial_0"],
["Dial_1", "Dial_1"],
["Dial_2", "Dial_2"],
["Dial_3", "Dial_3"],
["Dial_4", "Dial_4"],
["Dots_0", "Dots_0"],
["Dots_1", "Dots_1"],
["Dots_2", "Dots_2"],
["Dots_3", "Dots_3"],
["Hourglass_0", "Hourglass_0"],
["Hourglass_1", "Hourglass_1"],
["Hourglass_2", "Hourglass_2"],
["Timer_0", "Timer_0"],
["Timer_1", "Timer_1"],
["Timer_2", "Timer_2"],
["Timer_3", "Timer_3"],
["Timer_4", "Timer_4"],
["Water_level_0", "Water_level_0"],
["Water_level_1", "Water_level_1"],
["Water_level_2", "Water_level_2"],
["Water_level_3", "Water_level_3"],
],
"type": "field_dropdown"
}
],
"output": "String",
"helpUrl": '',
"tooltip": '',
"message0": '%1 %2'
});
}
};
// {
// "name": "path",
// "options": [
// ["Heart", "Heart"],
// ["Angry", "Angry"],
// ["Bored", "Bored"],
// ["Confused", "Confused"],
// ["Happy", "Happy"],
// ["Paper", "Paper"],
// ["Rock", "Rock"],
// ["Sad", "Sad"],
// ["Scissors", "Scissors"],
// ["Silly", "Silly"],
// ["Sleep", "Sleep"],
// ["Small_heart", "Small_heart"],
// ["Small_paper", "Small_paper"],
// ["Small_rock", "Small_rock"],
// ["Small_scissors", "Small_scissors"],
// ["Smile", "Smile"],
// ["Surprise", "Surprise"],
// ["Wonderful", "Wonderful"],
// ["Eyes_Angry", "Eyes_Angry"],
// ["Awake", "Awake"],
// ["Black_eye", "Black_eye"],
// ["Bottom_left", "Bottom_left"],
// ["Bottom_right", "Bottom_right"],
// ["Crazy_1", "Crazy_1"],
// ["Crazy_2", "Crazy_2"],
// ["Disappointed", "Disappointed"],
// ["Dizzy", "Dizzy"],
// ["Down", "Down"],
// ["Evil", "Evil"],
// ["Hurt", "Hurt"],
// ["Knocked_out", "Knocked_out"],
// ["Love", "Love"],
// ["Middle_left", "Middle_left"],
// ["Middle_right", "Middle_right"],
// ["Neutral", "Neutral"],
// ["Nuclear", "Nuclear"],
// ["Pinch_left", "Pinch_left"],
// ["Pinch_middle", "Pinch_middle"],
// ["Pinch_right", "Pinch_right"],
// ["Tear", "Tear"],
// ["Tired_left", "Tired_left"],
// ["Tired_middle", "Tired_middle"],
// ["Tired_right", "Tired_right"],
// ["Toxic", "Toxic"],
// ["Up", "Up"],
// ["Winking", "Winking"],
// ["Accept", "Accept"],
// ["Backward", "Backward"],
// ["Decline", "Decline"],
// ["Forward", "Forward"],
// ["Left", "Left"],
// ["No_go", "No_go"],
// ["Question_mark", "Question_mark"],
// ["Right", "Right"],
// ["Stop_1", "Stop_1"],
// ["Stop_2", "Stop_2"],
// ["Thumbs_down", "Thumbs_down"],
// ["Thumbs_up", "Thumbs_up"],
// ["Warning", "Warning"],
// ["Bomb", "Bomb"],
// ["Boom", "Boom"],
// ["Fire", "Fire"],
// ["Flowers", "Flowers"],
// ["Forest", "Forest"],
// ["Lightning", "Lightning"],
// ["Light_off", "Light_off"],
// ["Light_on", "Light_on"],
// ["Night", "Night"],
// ["Pirate", "Pirate"],
// ["Snow", "Snow"],
// ["Target", "Target"],
// ["Bar_0", "Bar_0"],
// ["Bar_1", "Bar_1"],
// ["Bar_2", "Bar_2"],
// ["Bar_3", "Bar_3"],
// ["Bar_4", "Bar_4"],
// ["Dial_0", "Dial_0"],
// ["Dial_1", "Dial_1"],
// ["Dial_2", "Dial_2"],
// ["Dial_3", "Dial_3"],
// ["Dial_4", "Dial_4"],
// ["Dots_0", "Dots_0"],
// ["Dots_1", "Dots_1"],
// ["Dots_2", "Dots_2"],
// ["Dots_3", "Dots_3"],
// ["Hourglass_0", "Hourglass_0"],
// ["Hourglass_1", "Hourglass_1"],
// ["Hourglass_2", "Hourglass_2"],
// ["Timer_0", "Timer_0"],
// ["Timer_1", "Timer_1"],
// ["Timer_2", "Timer_2"],
// ["Timer_3", "Timer_3"],
// ["Timer_4", "Timer_4"],
// ["Water_level_0", "Water_level_0"],
// ["Water_level_1", "Water_level_1"],
// ["Water_level_2", "Water_level_2"],
// ["Water_level_3", "Water_level_3"],
// ],
// "type": "field_dropdown"
// }
// ],
// "output": "String",
// "helpUrl": '',
// "tooltip": '',
// "message0": '%1 %2'
// });
// }
// };
//mixbot onboard_matrix below: