feat(boards): 所有micropython esp板卡加入 PE GX 类别

This commit is contained in:
王立帮
2026-01-13 15:09:06 +08:00
parent 583b82452a
commit a5fa5034f9
20 changed files with 1059 additions and 394 deletions

View File

@@ -158,6 +158,16 @@ div.blocklyToolboxDiv>div.blocklyToolboxContents>div:nth-child(12)>div.blocklyTr
background-size: 100% auto;
}
#catPE_G1.blocklyTreeRow>div.blocklyTreeRowContentContainer>span.blocklyTreeIcon {
background: url('../../../../common/media/mark/act.png') no-repeat;
background-size: 100% auto;
}
#catPE_G1.blocklyTreeRow.blocklyTreeSelected>div.blocklyTreeRowContentContainer>span.blocklyTreeIcon {
background: url('../../../../common/media/mark/act2.png') no-repeat;
background-size: 100% auto;
}
#catME_G1.blocklyTreeRow>div.blocklyTreeRowContentContainer>span.blocklyTreeIcon {
background: url('../../../../common/media/mark/sensor.png') no-repeat;
background-size: 100% auto;

View File

@@ -50,6 +50,7 @@ import {
MicroPythonInputBlocks,
MicroPythonIotBlocks,
MicroPythonNetworkBlocks,
MicroPythonPeG1Blocks,
MicroPythonSensorExternBlocks,
MicroPythonSensorOnBoardBlocks,
MicroPythonSerialBlocks,
@@ -71,6 +72,7 @@ import {
MicroPythonInputGenerators,
MicroPythonIotGenerators,
MicroPythonNetworkGenerators,
MicroPythonPeG1Generators,
MicroPythonSensorExternGenerators,
MicroPythonSensorOnBoardGenerators,
MicroPythonSerialGenerators,
@@ -137,6 +139,7 @@ Object.assign(
MicroPythonSensorOnBoardBlocks,
MicroPythonSensorExternBlocks,
MicroPythonNetworkBlocks,
MicroPythonPeG1Blocks,
MicroPythonAIBlocks,
MicroPythonActuatorOnBoardBlocks,
MicroPythonActuatorExternBlocks,
@@ -179,6 +182,7 @@ Object.assign(
MicroPythonSensorOnBoardGenerators,
MicroPythonSensorExternGenerators,
MicroPythonNetworkGenerators,
MicroPythonPeG1Generators,
MicroPythonAIGenerators,
MicroPythonActuatorOnBoardGenerators,
MicroPythonActuatorExternGenerators,

View File

@@ -1424,7 +1424,7 @@
</value>
</block>
<block type="sensor_mixgo_touch_slide"></block>
<block type="sensor_sound" m-show='micropython:esp32c2:mixgo_mini'></block>
<block type="sensor_sound" m-show='mixgo_mini'></block>
<!-- <block type="sensor_mixgocar_pin_near_line"
@@ -1434,18 +1434,18 @@
m-show='micropython:esp32c3:mixgocar_c3'></block>
<block type="sensor_mixgocar_battery_left" m-show='micropython:esp32c3:mixgocar_c3'></block>
-->
<block type="sensor_mixgo_pin_near_single" m-show='micropython:esp32c2:mixgo_mini'></block>
<block type="sensor_LTR308" m-show='micropython:esp32c2:mixgo_mini'></block>
<block type="sensor_eulerangles" m-show="micropython:esp32c2:mixgo_mini"></block>
<block type="sensor_mixgo_pin_near_single" m-show='mixgo_mini'></block>
<block type="sensor_LTR308" m-show='mixgo_mini'></block>
<block type="sensor_eulerangles" m-show="mixgo_mini"></block>
<!-- MixGo Me Onboard_sensor: -->
<block type="sensor_mixgome_temperature" m-show='micropython:esp32c2:mixgo_mini'></block>
<block type="sensor_hp203" m-show='micropython:esp32c2:mixgo_mini'></block>
<block type="sensor_aht11" m-show='micropython:esp32c2:mixgo_mini'></block>
<block type="sensor_get_acceleration" m-show='micropython:esp32c2:mixgo_mini'></block>
<block type="sensor_mixgo_cc_mmc5603_calibrate_compass" m-show="micropython:esp32c2:mixgo_mini"></block>
<block type="sensor_mixgo_cc_mmc5603_get_magnetic" m-show="micropython:esp32c2:mixgo_mini"></block>
<block type="sensor_mixgo_cc_mmc5603_get_angle" m-show="micropython:esp32c2:mixgo_mini"></block>
<block type="sensor_get_the_coprocessor_version" m-show="micropython:esp32c2:mixgo_mini"></block>
<block type="sensor_mixgome_temperature" m-show='mixgo_mini'></block>
<block type="sensor_hp203" m-show='mixgo_mini'></block>
<block type="sensor_aht11" m-show='mixgo_mini'></block>
<block type="sensor_get_acceleration" m-show='mixgo_mini'></block>
<block type="sensor_mixgo_cc_mmc5603_calibrate_compass" m-show="mixgo_mini"></block>
<block type="sensor_mixgo_cc_mmc5603_get_magnetic" m-show="mixgo_mini"></block>
<block type="sensor_mixgo_cc_mmc5603_get_angle" m-show="mixgo_mini"></block>
<block type="sensor_get_the_coprocessor_version" m-show="mixgo_mini"></block>
<block type="rfid_readid" m-show='micropython:esp32c3:mixgo_cc'>
<value name="SUB">
<shadow type="variables_get">
@@ -1548,7 +1548,7 @@
</category>
<category id="catOnBoardActuator" name="catOnBoardActuator" colour="#6C9858"
m-hide='micropython:esp32c3:generic'>
<block type="actuator_led_bright" m-show='micropython:esp32c2:mixgo_mini'>
<block type="actuator_led_bright" m-show='mixgo_mini'>
<value name="led">
<shadow type="number">
</shadow>
@@ -1558,7 +1558,7 @@
</shadow>
</value>
</block>
<block type="actuator_mixgo_zero_led_color" m-show='micropython:esp32c2:mixgo_mini'>
<block type="actuator_mixgo_zero_led_color" m-show='mixgo_mini'>
<value name="led">
<shadow type="number">
</shadow>
@@ -1568,7 +1568,7 @@
</shadow>
</value>
</block>
<block type="actuator_led_brightness" m-show='micropython:esp32c2:mixgo_mini'>
<block type="actuator_led_brightness" m-show='mixgo_mini'>
<value name="led">
<shadow type="number">
</shadow>
@@ -1579,13 +1579,13 @@
</shadow>
</value>
</block>
<block type="actuator_get_led_bright" m-show='micropython:esp32c2:mixgo_mini'>
<block type="actuator_get_led_bright" m-show='mixgo_mini'>
<value name="led">
<shadow type="number">
</shadow>
</value>
</block>
<block type="actuator_get_led_state" m-show='micropython:esp32c2:mixgo_mini'>
<block type="actuator_get_led_state" m-show='mixgo_mini'>
<value name="led">
<shadow type="number">
</shadow>
@@ -1718,15 +1718,15 @@
</block>
<block type="actuator_onboard_neopixel_write">
</block>
<block type="set_power_output" m-show="micropython:esp32c2:mixgo_mini">
<block type="set_power_output" m-show="mixgo_mini">
<value name="duty">
<shadow type="math_number">
<field name="NUM">100</field>
</shadow>
</value>
</block>
<block type="get_power_output" m-show="micropython:esp32c2:mixgo_mini"></block>
<block type="set_all_power_output" m-show="micropython:esp32c2:mixgo_mini">
<block type="get_power_output" m-show="mixgo_mini"></block>
<block type="set_all_power_output" m-show="mixgo_mini">
<value name="duty">
<shadow type="math_number">
<field name="NUM">20000</field>
@@ -1734,7 +1734,7 @@
</value>
</block>
<block type="analog_keyboard_input" m-show="micropython:esp32c2:mixgo_mini">
<block type="analog_keyboard_input" m-show="mixgo_mini">
<value name="special">
<block type="special_key">
</block>
@@ -1744,14 +1744,14 @@
</block>
</value>
</block>
<block type="general_key_tuple" m-show="micropython:esp32c2:mixgo_mini">
<block type="general_key_tuple" m-show="mixgo_mini">
<value name="general">
<block type="general_key">
</block>
</value>
</block>
<block type="analog_mouse_input" m-show="micropython:esp32c2:mixgo_mini">
<block type="analog_mouse_input" m-show="mixgo_mini">
<value name="key">
<block type="mouse_key">
</block>
@@ -1769,7 +1769,7 @@
</shadow>
</value>
</block>
<block type="analog_keyboard_str" m-show="micropython:esp32c2:mixgo_mini">
<block type="analog_keyboard_str" m-show="mixgo_mini">
<value name="str">
<shadow type="text">
<field name="TEXT">Hello, Mixly!</field>
@@ -1781,9 +1781,9 @@
</shadow>
</value>
</block>
<block type="set_microphone_amplification" m-show="micropython:esp32c2:mixgo_mini">
<block type="set_microphone_amplification" m-show="mixgo_mini">
</block>
<block type="record_audio" m-show="micropython:esp32c2:mixgo_mini">
<block type="record_audio" m-show="mixgo_mini">
<value name="str">
<shadow type="text">
<field name="TEXT">mixly.wav</field>
@@ -1839,7 +1839,7 @@
</shadow>
</value>
</block>
<block type="display_scroll_way" m-show='micropython:esp32c2:mixgo_mini'></block>
<block type="display_scroll_way" m-show='mixgo_mini'></block>
<block type="display_show_frame_string">
<value name="data">
<shadow type="text">
@@ -1859,8 +1859,8 @@
</shadow>
</value>
</block>
<block type="mixgomini_display_bitmap_create" m-show='micropython:esp32c2:mixgo_mini'></block>
<block type="display_image_builtins_all" m-show='micropython:esp32c2:mixgo_mini'></block>
<block type="mixgomini_display_bitmap_create" m-show='mixgo_mini'></block>
<block type="display_image_builtins_all" m-show='mixgo_mini'></block>
<block type="image_arithmetic">
<value name="A">
<shadow type="pins_builtinimg"></shadow>
@@ -1920,7 +1920,7 @@
</block>
</category>
<category id="catME_GO" colour="100" m-show='micropython:esp32c2:mixgo_mini'>
<category id="catME_GO" colour="100" m-show='mixgo_mini'>
<block type="ce_go_led_bright">
<value name="led">
<shadow type="ce_go_light_number">
@@ -2013,13 +2013,139 @@
<block type="ce_go_pin_light"></block>
<block type="sensor_mixgome_eulerangles" m-show='micropython:esp32c3:mixgo_me'></block>
</category>
<category id="catCC_G1" colour="40" m-show="micropython:esp32c2:mixgo_mini">
<category id="catPE_G1" colour="100" m-show='mixgo_mini'>
<block type="communicate_i2c_init">
<value name="SUB">
<shadow type="variables_get">
<field name="VAR">i2c_extend</field>
</shadow>
</value>
<value name="TX">
<shadow type="pins_digital_pin">
<field name="PIN">21</field>
</shadow>
</value>
<value name="RX">
<shadow type="pins_digital_pin">
<field name="PIN">22</field>
</shadow>
</value>
<value name="freq">
<shadow type="math_number">
<field name="NUM">400000</field>
</shadow>
</value>
<next>
<block type="pe_g1_use_i2c_init">
<value name="SUB">
<shadow type="variables_get">
<field name="VAR">pe</field>
</shadow>
</value>
<value name="I2CSUB">
<shadow type="variables_get">
<field name="VAR">i2c_extend</field>
</shadow>
</value>
</block>
</next>
</block>
<block type="pe_g1_battery_left">
<value name="SUB">
<shadow type="variables_get">
<field name="VAR">pe</field>
</shadow>
</value>
</block>
<block type="pe_g1_servo_set_angle">
<value name="SUB">
<shadow type="variables_get">
<field name="VAR">pe</field>
</shadow>
</value>
<value name="PIN">
<shadow type="number5">
</shadow>
</value>
<value name="NUM">
<shadow type="math_number">
<field name="NUM">100</field>
</shadow>
</value>
</block>
<block type="pe_g1_servo_get_angle">
<value name="SUB">
<shadow type="variables_get">
<field name="VAR">pe</field>
</shadow>
</value>
<value name="PIN">
<shadow type="number5">
</shadow>
</value>
</block>
<block type="pe_g1_servo_set_speed">
<value name="SUB">
<shadow type="variables_get">
<field name="VAR">pe</field>
</shadow>
</value>
<value name="PIN">
<shadow type="number5">
</shadow>
</value>
<value name="NUM">
<shadow type="math_number">
<field name="NUM">100</field>
</shadow>
</value>
</block>
<block type="pe_g1_servo_get_speed">
<value name="SUB">
<shadow type="variables_get">
<field name="VAR">pe</field>
</shadow>
</value>
<value name="PIN">
<shadow type="number5">
</shadow>
</value>
</block>
<block type="pe_g1_dc_motor">
<value name="SUB">
<shadow type="variables_get">
<field name="VAR">pe</field>
</shadow>
</value>
<value name="PIN">
<shadow type="number4">
</shadow>
</value>
<value name="speed">
<shadow type="math_number">
<field name="NUM">100</field>
</shadow>
</value>
</block>
<block type="pe_g1_dc_motor_speed">
<value name="SUB">
<shadow type="variables_get">
<field name="VAR">pe</field>
</shadow>
</value>
<value name="PIN">
<shadow type="number4">
</shadow>
</value>
</block>
</category>
<category id="catCC_G1" colour="40" m-show="mixgo_mini">
<block type="cc_g1_read_bat"></block>
<block type="cc_g1_read_joystick"></block>
<block type="cc_g1_read_key"></block>
<block type="cc_g1_turnoff"></block>
</category>
<category id="catMINI_G2" colour="40" m-show='micropython:esp32c2:mixgo_mini'>
<category id="catMINI_G2" colour="40" m-show='mixgo_mini'>
<block type="rfid_status"></block>
<block type="rfid_readid"></block>
<block type="rfid_readcontent">
@@ -2054,7 +2180,7 @@
</value>
</block>
</category>
<category id="catMINI_G5" colour="40" m-show='micropython:esp32c2:mixgo_mini'>
<category id="catMINI_G5" colour="40" m-show='mixgo_mini'>
<block type="rfid_status"></block>
<block type="rfid_readid"></block>
<block type="rfid_readcontent">