修改 mixgo_sant

This commit is contained in:
Irene-Maxine
2025-01-09 12:42:14 +08:00
parent a9d4e9b83e
commit 6957182e71
30 changed files with 1310 additions and 309 deletions

View File

@@ -0,0 +1,149 @@
import * as Blockly from 'blockly/core';
import { Boards } from 'mixly';
const MEG1_HUE = 40;
// export const mini_g2_aht11 = {
// init: function () {
// var version = Boards.getSelectedBoardKey().split(':')[2]
// if (version == "mixgo_me") { var name = 'ME G1' }
// this.setColour(MEG1_HUE);
// this.appendDummyInput("")
// .appendField(name)
// .appendField(Blockly.Msg.MIXLY_TEM_HUM + " AHT21")
// .appendField(new Blockly.FieldDropdown([
// [Blockly.Msg.MIXLY_GETTEMPERATUE, "temperature"],
// [Blockly.Msg.MIXLY_GETHUMIDITY, "humidity"]
// ]), "key");
// this.setOutput(true, Number);
// this.setInputsInline(true);
// var thisBlock = this;
// this.setTooltip(function () {
// var mode = thisBlock.getFieldValue('key');
// var TOOLTIPS = {
// "temperature": Blockly.Msg.MIXLY_MICROBIT_SENSOR_SHT_temperature_TOOLTIP,
// "relative_humidity": Blockly.Msg.MIXLY_MICROBIT_SENSOR_SHT_HUM_TOOLTIP
// };
// return TOOLTIPS[mode]
// });
// }
// };
// export const mini_g2_hp203 = {
// init: function () {
// var version = Boards.getSelectedBoardKey().split(':')[2]
// if (version == "mixgo_me") { var name = 'ME G1' }
// this.setColour(MEG1_HUE);
// this.appendDummyInput("")
// .appendField(name)
// .appendField(Blockly.Msg.MIXLY_Altitude + Blockly.Msg.MSG.catSensor + " HP203X")
// .appendField(new Blockly.FieldDropdown([
// [Blockly.Msg.MIXLY_GETPRESSURE, "pressure()"],
// [Blockly.Msg.MIXLY_GETTEMPERATUE, "temperature()"],
// [Blockly.Msg.MIXLY_GET_ALTITUDE, "altitude()"],
// ]), "key");
// this.setOutput(true, Number);
// this.setInputsInline(true);
// }
// };
// export const mini_g2_varistor = {
// init: function () {
// var version = Boards.getSelectedBoardKey().split(':')[2]
// if (version == "mixgo_me") { var name = 'ME G1' }
// this.setColour(MEG1_HUE);
// this.appendDummyInput()
// .appendField(name)
// .appendField(Blockly.Msg.MIXLY_MIXGO_NOVA_POTENTIAL_NUM);
// this.setOutput(true, Number);
// this.setInputsInline(true);
// }
// };
export const mini_g2_rfid_readid = {
init: function () {
var version = Boards.getSelectedBoardKey().split(':')[2]
if (version == "mixgo_me") { var name = 'ME G1' }
this.setColour(MEG1_HUE);
this.appendDummyInput()
.appendField(name)
.appendField("RFID" + Blockly.Msg.MIXLY_RFID_READ_CARD);
this.appendDummyInput("")
.appendField(Blockly.Msg.MIXLY_RFID_READ_CARD_UID);
this.setOutput(true, Number);
this.setInputsInline(true);
}
};
export const mini_g2_rfid_readcontent = {
init: function () {
var version = Boards.getSelectedBoardKey().split(':')[2]
if (version == "mixgo_me") { var name = 'ME G1' }
this.setColour(MEG1_HUE);
this.appendDummyInput()
.appendField(name)
.appendField("RFID" + Blockly.Msg.MIXLY_RFID_READ_CARD);
this.appendValueInput('SECTOR')
.appendField(Blockly.Msg.MIXLY_LIST_INDEX)
this.appendDummyInput("")
.appendField(Blockly.Msg.MIXLY_MICROBIT_PY_STORAGE_ALL);
this.setOutput(true, Number);
this.setInputsInline(true);
}
};
export const mini_g2_rfid_write = {
init: function () {
var version = Boards.getSelectedBoardKey().split(':')[2]
if (version == "mixgo_me") { var name = 'ME G1' }
this.setColour(MEG1_HUE);
this.appendDummyInput()
.appendField(name)
.appendField(Blockly.Msg.MIXLY_COMMUNICATION_RFID_WRITE);
this.appendValueInput('SECTOR')
.appendField(Blockly.Msg.MIXLY_LIST_INDEX)
this.appendValueInput('CONTENT')
.appendField(Blockly.Msg.MIXLY_COMMUNICATION_WRITE_NUM)
this.setInputsInline(true);
this.setPreviousStatement(true, null);
this.setNextStatement(true, null);
}
};
export const mini_g2_rfid_write_outcome = {
init: function () {
var version = Boards.getSelectedBoardKey().split(':')[2]
if (version == "mixgo_me") { var name = 'ME G1' }
this.setColour(MEG1_HUE);
this.appendDummyInput()
.appendField(name)
.appendField(Blockly.Msg.MIXLY_COMMUNICATION_RFID_WRITE);
this.appendValueInput('SECTOR')
.appendField(Blockly.Msg.MIXLY_LIST_INDEX)
this.appendValueInput('CONTENT')
.appendField(Blockly.Msg.MIXLY_COMMUNICATION_WRITE_NUM)
this.appendDummyInput()
.appendField(Blockly.Msg.RETURN_SUCCESS_OR_NOT)
this.setInputsInline(true);
this.setOutput(true);
}
};
export const mini_g2_rfid_status = {
init: function () {
var version = Boards.getSelectedBoardKey().split(':')[2]
if (version == "mixgo_me") { var name = 'ME G1' }
this.setColour(MEG1_HUE);
this.appendDummyInput()
.appendField(name)
.appendField("RFID");
this.appendDummyInput("")
.appendField(new Blockly.FieldDropdown([
[Blockly.Msg.MIXLY_RFID_SCAN_OK, "True"],
[Blockly.Msg.MIXLY_RFID_SCAN_NOTAGERR, "None"],
[Blockly.Msg.MIXLY_RFID_SCAN_ERROR, "False"]
]), "key");
this.setOutput(true, Number);
this.setInputsInline(true);
}
};

View File

@@ -118,20 +118,12 @@ div.blocklyToolboxDiv > div.blocklyToolboxContents > div:nth-child(12) > div.blo
background:url('../../../../common/media/mark/display_new2.png') no-repeat;
background-size: 100% auto;
}
#catME_GO.blocklyTreeRow > div.blocklyTreeRowContentContainer > span.blocklyTreeIcon{
background:url('../../../../common/media/mark/act.png') no-repeat;
#catSANT_G2.blocklyTreeRow > div.blocklyTreeRowContentContainer > span.blocklyTreeIcon{
background:url('../../../../common/media/mark/sensor.png') no-repeat;
background-size: 100% auto;
}
#catME_GO.blocklyTreeRow.blocklyTreeSelected > div.blocklyTreeRowContentContainer > span.blocklyTreeIcon{
background:url('../../../../common/media/mark/act2.png') no-repeat;
background-size: 100% auto;
}
#catCE_G6.blocklyTreeRow > div.blocklyTreeRowContentContainer > span.blocklyTreeIcon{
background:url('../../../../common/media/mark/act.png') no-repeat;
background-size: 100% auto;
}
#catCE_G6.blocklyTreeRow.blocklyTreeSelected > div.blocklyTreeRowContentContainer > span.blocklyTreeIcon{
background:url('../../../../common/media/mark/act2.png') no-repeat;
#catSANT_G2.blocklyTreeRow.blocklyTreeSelected > div.blocklyTreeRowContentContainer > span.blocklyTreeIcon{
background:url('../../../../common/media/mark/sensor2.png') no-repeat;
background-size: 100% auto;
}
#catExternSensor.blocklyTreeRow > div.blocklyTreeRowContentContainer > span.blocklyTreeIcon{

View File

@@ -1,13 +1,17 @@
import MicropythonESP32S3Pins from './blocks/esp32_profile';
import * as MicropythonESP32S3InoutBlocks from './blocks/inout';
import * as MicropythonESP32S3PinsBlocks from './blocks/pins';
import * as MicropythonESP32S3SANTG2Blocks from './blocks/sant_g2';
import * as MicropythonESP32S3InoutGenerators from './generators/inout';
import * as MicropythonESP32S3PinsGenerators from './generators/pins';
import * as MicropythonESP32S3SANTG2Generators from './generators/sant_g2';
export {
MicropythonESP32S3Pins,
MicropythonESP32S3InoutBlocks,
MicropythonESP32S3PinsBlocks,
MicropythonESP32S3SANTG2Blocks,
MicropythonESP32S3InoutGenerators,
MicropythonESP32S3PinsGenerators
MicropythonESP32S3PinsGenerators,
MicropythonESP32S3SANTG2Generators
};

View File

@@ -0,0 +1,88 @@
import { Boards } from 'mixly';
// export const mini_g2_aht11 = function (_, generator) {
// var key = this.getFieldValue('key');
// generator.definitions_['import_mini_g2'] = 'import mini_g2';
// var code = 'mini_g2.ext_ahtx0.' + key + '()';
// return [code, generator.ORDER_ATOMIC];
// }
// export const mini_g2_hp203 = function (_, generator) {
// var key = this.getFieldValue('key');
// generator.definitions_['import_mini_g2'] = 'import mini_g2';
// var code = 'mini_g2.ext_hp203x.' + key;
// return [code, generator.ORDER_ATOMIC];
// }
// export const mini_g2_varistor = function (_, generator) {
// generator.definitions_['import_mini_g2'] = 'import mini_g2';
// var code = 'mini_g2.varistor()';
// return [code, generator.ORDER_ATOMIC];
// }
export const mini_g2_rfid_readid = function (_, generator) {
generator.definitions_['import_mini_g2'] = 'import mini_g2';
var version = Boards.getSelectedBoardKey().split(':')[2];
if (version == "mixgo_mini") {
generator.definitions_['import_mini_g2_ext_rfid'] = 'from mini_g2 import ext_rfid';
var code = 'ext_rfid.read_card(0, x="id")';
} else {
generator.definitions_['import_mini_g2'] = 'import mini_g2';
var code = 'mini_g2.ext_rc522.read_card(0, x="id")';
}
return [code, generator.ORDER_ATOMIC];
}
export const mini_g2_rfid_readcontent = function (_, generator) {
var version = Boards.getSelectedBoardKey().split(':')[2];
var sector = generator.valueToCode(this, 'SECTOR', generator.ORDER_ATOMIC);
if (version == "mixgo_mini") {
generator.definitions_['import_mini_g2_ext_rfid'] = 'from mini_g2 import ext_rfid';
var code = 'ext_rfid.read_card(' + sector + ')';
} else {
generator.definitions_['import_mini_g2'] = 'import mini_g2';
var code = 'mini_g2.ext_rc522.read_card(' + sector + ')';
}
return [code, generator.ORDER_ATOMIC];
}
export const mini_g2_rfid_write = function (_, generator) {
var version = Boards.getSelectedBoardKey().split(':')[2];
var sector = generator.valueToCode(this, 'SECTOR', generator.ORDER_ATOMIC);
var cnt = generator.valueToCode(this, 'CONTENT', generator.ORDER_ATOMIC);
if (version == "mixgo_mini") {
generator.definitions_['import_mini_g2_ext_rfid'] = 'from mini_g2 import ext_rfid';
var code = 'ext_rfid.write_card(' + cnt + ',' + sector + ')\n';
} else {
generator.definitions_['import_mini_g2'] = 'import mini_g2';
var code = 'mini_g2.ext_rc522.write_card(' + cnt + ',' + sector + ')\n';
}
return code;
}
export const mini_g2_rfid_write_outcome = function (_, generator) {
var version = Boards.getSelectedBoardKey().split(':')[2];
var sector = generator.valueToCode(this, 'SECTOR', generator.ORDER_ATOMIC);
var cnt = generator.valueToCode(this, 'CONTENT', generator.ORDER_ATOMIC);
if (version == "mixgo_mini") {
generator.definitions_['import_mini_g2_ext_rfid'] = 'from mini_g2 import ext_rfid';
var code = 'ext_rfid.write_card(' + cnt + ',' + sector + ')';
} else {
generator.definitions_['import_mini_g2'] = 'import mini_g2';
var code = 'mini_g2.ext_rc522.write_card(' + cnt + ',' + sector + ')';
}
return [code, generator.ORDER_ATOMIC];
}
export const mini_g2_rfid_status = function (_, generator) {
var version = Boards.getSelectedBoardKey().split(':')[2];
var key = this.getFieldValue('key');
if (version == "mixgo_mini") {
generator.definitions_['import_mini_g2_ext_rfid'] = 'from mini_g2 import ext_rfid';
var code = 'ext_rfid.scan_card()==' + key;
} else {
generator.definitions_['import_mini_g2'] = 'import mini_g2';
var code = 'mini_g2.ext_rc522.scan_card()==' + key;
}
return [code, generator.ORDER_ATOMIC];
}

View File

@@ -78,8 +78,10 @@ import {
MicropythonESP32S3Pins,
MicropythonESP32S3InoutBlocks,
MicropythonESP32S3PinsBlocks,
MicropythonESP32S3SANTG2Blocks,
MicropythonESP32S3InoutGenerators,
MicropythonESP32S3PinsGenerators
MicropythonESP32S3PinsGenerators,
MicropythonESP32S3SANTG2Generators
} from './';
import './css/color_esp32s2_mixgoce.css';
@@ -128,7 +130,8 @@ Object.assign(
MicroPythonBlynkBlocks,
MicroPythonNovaG1Blocks,
MicropythonESP32S3InoutBlocks,
MicropythonESP32S3PinsBlocks
MicropythonESP32S3PinsBlocks,
MicropythonESP32S3SANTG2Blocks
);
Object.assign(
@@ -166,5 +169,6 @@ Object.assign(
MicroPythonBlynkGenerators,
MicroPythonNovaG1Generators,
MicropythonESP32S3InoutGenerators,
MicropythonESP32S3PinsGenerators
MicropythonESP32S3PinsGenerators,
MicropythonESP32S3SANTG2Generators
);

View File

@@ -0,0 +1,23 @@
"""
MINI G2 -MixGo MINI EXT G2
MicroPython library for the MINI G2 (Expansion board for MixGo MINI)
=======================================================
@dahanzimin From the Mixly Team
"""
import gc
from machine import Pin, SoftI2C
'''i2c-extboard'''
ext_i2c = SoftI2C(scl=Pin(7), sda=Pin(8), freq=400000)
'''RFID_Sensor'''
try :
import rc522
ext_rfid = rc522.RC522(ext_i2c)
except Exception as e:
print("Warning: Failed to communicate with SI522A (RFID) or",e)
'''Reclaim memory'''
gc.collect()

View File

@@ -1,8 +1,7 @@
{
"board": {
"元控青春": "micropython:esp32s3:mixgo_nova",
"元控": "micropython:esp32s3:mixgo_zero",
"MixGo Sant": "micropython:esp32c3:mixgo_sant"
"元控自强": "micropython:esp32s3:mixgo_sant"
},
"language": "MicroPython",
"burn": {

View File

@@ -1420,32 +1420,33 @@
</value>
</block>
<block type="sensor_mixgo_touch_slide"></block>
<block type="sensor_mixgo_pin_near" m-show='micropython:esp32s3:mixgo_zero'></block>
<block type="sensor_mixgo_nova_pin_near" m-show='micropython:esp32s3:mixgo_nova'></block>
<block type="sensor_mixgo_LTR308" m-show='micropython:esp32s3:mixgo_zero'></block>
<block type="sensor_mixgo_nova_LTR308" m-show='micropython:esp32s3:mixgo_nova'></block>
<block type="sensor_mixgo_pin_near" m-show='micropython:esp32s3:mixgo_sant'></block>
<!-- <block type="sensor_mixgo_nova_pin_near" m-show='micropython:esp32s3:mixgo_nova'></block> -->
<block type="sensor_mixgo_LTR308" m-show='micropython:esp32s3:mixgo_sant'></block>
<!-- <block type="sensor_mixgo_nova_LTR308" m-show='micropython:esp32s3:mixgo_nova'></block> -->
<block type="sensor_mixgo_sant_color" m-show='micropython:esp32s3:mixgo_sant'></block>
<block type="sensor_sound"></block>
<block type="sensor_hp203" m-show='micropython:esp32s3:mixgo_zero'></block>
<block type="sensor_hp203" m-show='micropython:esp32s3:mixgo_sant'></block>
<block type="sensor_aht11"></block>
<block type="sensor_get_acceleration"></block>
<block type="sensor_mixgo_cc_mmc5603_calibrate_compass"></block>
<block type="sensor_mixgo_cc_mmc5603_get_magnetic"></block>
<block type="sensor_mixgo_cc_mmc5603_get_angle"></block>
<block type="rfid_readid">
<block type="rfid_readid" m-hide='micropython:esp32s3:mixgo_sant'>
<value name="SUB">
<shadow type="variables_get">
<field name="VAR">rfid</field>
</shadow>
</value>
</block>
<block type="rfid_readcontent">
<block type="rfid_readcontent" m-hide='micropython:esp32s3:mixgo_sant'>
<value name="SECTOR">
<shadow type="math_number">
<field name="NUM">0</field>
</shadow>
</value>
</block>
<block type="rfid_write">
<block type="rfid_write" m-hide='micropython:esp32s3:mixgo_sant'>
<value name="SECTOR">
<shadow type="math_number">
<field name="NUM">0</field>
@@ -1457,7 +1458,7 @@
</shadow>
</value>
</block>
<block type="rfid_write_return">
<block type="rfid_write_return" m-hide='micropython:esp32s3:mixgo_sant'>
<value name="SECTOR">
<shadow type="math_number">
<field name="NUM">0</field>
@@ -1469,6 +1470,15 @@
</shadow>
</value>
</block>
<block type="CI130X_IDENTIFY_AND_SAVE_SANT" m-show='micropython:esp32s3:mixgo_sant'></block>
<block type="CI130X_GET_WHETHER_IDENTIFY_SANT" m-show='micropython:esp32s3:mixgo_sant'></block>
<block type="CI130X_GET_THE_RECOGNIZED_CMD_SANT" m-show='micropython:esp32s3:mixgo_sant'></block>
<block type="CI130X_BROADCAST_SANT" m-show='micropython:esp32s3:mixgo_sant'>
<value name="NUM">
<block type="logic_null"></block>
</value>
</block>
<block type = "CI130X_SET_SYSTEM_CMD_SANT" m-show='micropython:esp32s3:mixgo_sant'></block>
<block type="onboard_RTC_set_datetime">
<value name="year">
<shadow type="math_number">
@@ -1559,7 +1569,7 @@
</shadow>
</value>
</block>
<block type="actuator_mixgo_zero_led_color" m-show='micropython:esp32s3:mixgo_zero'>
<block type="actuator_mixgo_zero_led_color" m-show='micropython:esp32s3:mixgo_sant'>
<value name="led">
<shadow type="number">
</shadow>
@@ -1569,22 +1579,22 @@
</shadow>
</value>
</block>
<block type="actuator_mixgo_nova_mic_set">
<block type="actuator_mixgo_nova_mic_set" m-hide='micropython:esp32s3:mixgo_sant'>
<value name="bright">
<shadow type="math_number">
<field name="NUM">100</field>
</shadow>
</value>
</block>
<block type="actuator_mixgo_nova_mic_get"></block>
<block type="actuator_mixgo_nova_voice_set">
<block type="actuator_mixgo_nova_mic_get" m-hide='micropython:esp32s3:mixgo_sant'></block>
<block type="actuator_mixgo_nova_voice_set" m-hide='micropython:esp32s3:mixgo_sant'>
<value name="bright">
<shadow type="math_number">
<field name="NUM">100</field>
</shadow>
</value>
</block>
<block type="actuator_mixgo_nova_voice_get"></block>
<block type="actuator_mixgo_nova_voice_get" m-hide='micropython:esp32s3:mixgo_sant'></block>
<!-- <block type="actuator_mixgo_nova_onboard_music_pitch">
<value name="pitch">
<shadow type="pins_tone_notes">
@@ -1592,7 +1602,7 @@
</shadow>
</value>
</block> -->
<block type="esp32_onboard_music_pitch_with_time">
<block type="esp32_onboard_music_pitch_with_time" m-hide='micropython:esp32s3:mixgo_sant'>
<value name="pitch">
<shadow type="pins_tone_notes">
<field name="PIN">440</field>
@@ -1611,12 +1621,12 @@
</shadow>
</value>
</block> -->
<block type="esp32_onboard_music_play_list">
<block type="esp32_onboard_music_play_list" m-hide='micropython:esp32s3:mixgo_sant'>
<value name="LIST">
<shadow type="pins_playlist"></shadow>
</value>
</block>
<block type="actuator_mixgo_nova_record_audio">
<block type="actuator_mixgo_nova_record_audio" m-hide='micropython:esp32s3:mixgo_sant'>
<value name="PATH">
<shadow type="text">
<field name="TEXT">/sd/1.wav</field>
@@ -1628,14 +1638,14 @@
</shadow>
</value>
</block>
<block type="actuator_mixgo_nova_play_audio">
<block type="actuator_mixgo_nova_play_audio" m-hide='micropython:esp32s3:mixgo_sant'>
<value name="PATH">
<shadow type="text">
<field name="TEXT">/sd/1.wav</field>
</shadow>
</value>
</block>
<block type="actuator_mixgo_nova_play_online_audio">
<block type="actuator_mixgo_nova_play_online_audio" m-hide='micropython:esp32s3:mixgo_sant'>
<value name="PATH">
<shadow type="text">
<field name="TEXT">https://gitee.com/dahanzimin/test/raw/master/wav/8.wav</field>
@@ -1643,6 +1653,52 @@
</value>
</block>
<block type="esp32_onboard_music_pitch" m-show='micropython:esp32s3:mixgo_sant'>
<value name="pitch">
<shadow type="pins_tone_notes">
<field name="PIN">440</field>
</shadow>
</value>
</block>
<block type="esp32_onboard_music_pitch_with_time" m-show='micropython:esp32s3:mixgo_sant'>
<value name="pitch">
<shadow type="pins_tone_notes">
<field name="PIN">440</field>
</shadow>
</value>
<value name="time">
<shadow type="math_number">
<field name="NUM">1000</field>
</shadow>
</value>
</block>
<block type="esp32_onboard_music_stop" m-show='micropython:esp32s3:mixgo_sant'>
<value name="PIN">
<shadow type="pins_pwm_pin">
<field name="PIN">0</field>
</shadow>
</value>
</block>
<block type="esp32_onboard_music_play_list" m-show='micropython:esp32s3:mixgo_sant'>
<value name="LIST">
<shadow type="pins_playlist"></shadow>
</value>
</block>
<block type="esp32_music_set_tempo" m-show='micropython:esp32s3:mixgo_sant'>
<value name="TICKS">
<shadow type="math_number">
<field name="NUM">4</field>
</shadow>
</value>
<value name="BPM">
<shadow type="math_number">
<field name="NUM">120</field>
</shadow>
</value>
</block>
<block type="esp32_music_get_tempo" m-show='micropython:esp32s3:mixgo_sant'></block>
<block type="esp32_music_reset" m-show='micropython:esp32s3:mixgo_sant'></block>
<block type="actuator_onboard_neopixel_rgb">
<value name="_LED_">
<shadow type="math_number">
@@ -1713,6 +1769,67 @@
</block>
<block type="actuator_onboard_neopixel_write">
</block>
<block type="set_power_output" m-show="micropython:esp32s3:mixgo_sant">
<value name="duty">
<shadow type="math_number">
<field name="NUM">100</field>
</shadow>
</value>
</block>
<block type="set_all_power_output" m-show="micropython:esp32s3:mixgo_sant">
<value name="duty">
<shadow type="math_number">
<field name="NUM">20000</field>
</shadow>
</value>
</block>
<block type="analog_keyboard_input" m-show="micropython:esp32s3:mixgo_sant">
<value name="special">
<block type="special_key">
</block>
</value>
<value name="general">
<block type="general_key">
</block>
</value>
</block>
<block type="general_key_tuple" m-show="micropython:esp32s3:mixgo_sant">
<value name="general">
<block type="general_key">
</block>
</value>
</block>
<block type="analog_mouse_input" m-show="micropython:esp32s3:mixgo_sant">
<value name="key">
<block type="mouse_key">
</block>
</value>
<value name="x">
<shadow type="math_number">
</shadow>
</value>
<value name="y">
<shadow type="math_number">
</shadow>
</value>
<value name="wheel">
<shadow type="math_number">
</shadow>
</value>
</block>
<block type="analog_keyboard_str" m-show="micropython:esp32s3:mixgo_sant">
<value name="str">
<shadow type="text">
<field name="TEXT">Hello, Mixly!</field>
</shadow>
</value>
<value name="time">
<shadow type="math_number">
<field name="NUM">10</field>
</shadow>
</value>
</block>
</category>
<category id="catOnBoardDisplay" colour='#78B5B4'>
<block type="mpython_pbm_image"></block>
@@ -2156,225 +2273,54 @@
</value>
</block>
</category>
<!-- <category id="catME_GO" colour="100">
<block type="ce_go_led_bright">
<value name="led">
<shadow type="ce_go_light_number">
</shadow>
</value>
<value name="bright">
<shadow type="ledswitch">
</shadow>
</value>
</block>
<block type="ce_go_get_led_state">
<value name="led">
<shadow type="ce_go_light_number">
</shadow>
</value>
</block>
<block type="ce_go_led_brightness">
<value name="led">
<shadow type="ce_go_light_number">
</shadow>
</value>
<value name="bright">
<shadow type="math_number">
<field name="NUM">100</field>
</shadow>
</value>
</block>
<block type="ce_go_get_led_bright">
<value name="led">
<shadow type="ce_go_light_number">
</shadow>
</value>
</block>
<block type="ce_go_stepper_keep">
<value name="speed">
<shadow type="math_number">
<field name="NUM">100</field>
</shadow>
</value>
</block>
<block type="ce_go_stepper_stop"></block>
<block type="ce_go_dc_motor">
<value name="speed">
<shadow type="math_number">
<field name="NUM">100</field>
</shadow>
</value>
</block>
<block type="ce_go_hall_initialize">
<value name="num">
<category id="catSANT_G2" colour="40" m-show='micropython:esp32s3:mixgo_sant'>
<block type="mini_g2_rfid_readcontent">
<value name="SECTOR">
<shadow type="math_number">
<field name="NUM">0</field>
</shadow>
</value>
</block>
<block type="ce_go_hall_data">
</block>
<block type="ce_go_hall_attachInterrupt">
<value name="DO">
<shadow type="factory_block_return">
<field name="VALUE">interrupt_func</field>
<block type="mini_g2_rfid_readid"></block>
<block type="mini_g2_rfid_write">
<value name="SECTOR">
<shadow type="math_number">
<field name="NUM">0</field>
</shadow>
</value>
<value name="CONTENT">
<shadow type="text">
<field name="TEXT">Mixly</field>
</shadow>
</value>
</block>
<block type="procedures_defnoreturn">
<mutation>
<arg name="turns"></arg>
<arg name="distance"></arg>
</mutation>
<field name="NAME">interrupt_func</field>
<statement name="STACK">
<block type="system_print_many">
<mutation items="2"></mutation>
<value name="ADD0">
<block type="variables_get">
<field name="VAR">turns</field>
</block>
</value>
<value name="ADD1">
<block type="variables_get">
<field name="VAR">distance</field>
</block>
</value>
</block>
</statement>
<block type="mini_g2_rfid_write_outcome">
<value name="SECTOR">
<shadow type="math_number">
<field name="NUM">0</field>
</shadow>
</value>
<value name="CONTENT">
<shadow type="text">
<field name="TEXT">Mixly</field>
</shadow>
</value>
</block>
<block type="ce_go_pin_near_state_change"></block>
<block type="ce_go_pin_near_line"></block>
<block type="ce_go_pin_near"></block>
<block type="ce_go_pin_light"></block>
<block type="sensor_mixgome_eulerangles"></block>
<block type="mini_g2_rfid_status"></block>
<block type="radar_set_DETECTION_THRESHOLD_SANT">
<value name="VAR">
<shadow type="math_number">
<field name="NUM">5000</field>
</shadow>
</value>
<value name="VAR2">
<shadow type="math_number">
<field name="NUM">500</field>
</shadow>
</value>
</block>
<block type="interaction_whether_to_interaction_SANT"></block>
</category>
<category id="catCE_G6" colour="100">
<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">17</field>
</shadow>
</value>
<value name="RX">
<shadow type="pins_digital_pin">
<field name="PIN">18</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">g6</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">g6</field>
</shadow>
</value>
</block>
<block type="pe_g1_servo_set_angle">
<value name="SUB">
<shadow type="variables_get">
<field name="VAR">g6</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">g6</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">g6</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">g6</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">g6</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">g6</field>
</shadow>
</value>
<value name="PIN">
<shadow type="number4">
</shadow>
</value>
</block>
</category> -->
<category id="catIot" colour="#2FAD7A">
<category id="catBlynk" colour="#2FAD7A">
<block type="iot_wifi_connect">
@@ -4054,7 +4000,7 @@
</shadow>
</value>
</block>
<block type="radar_set_DETECTION_THRESHOLD">
<block type="radar_set_DETECTION_THRESHOLD" m-hide='micropython:esp32s3:mixgo_sant'>
<value name="SUB">
<shadow type="variables_get">
<field name="VAR">xsensor</field>
@@ -4071,35 +4017,35 @@
</shadow>
</value>
</block>
<block type="interaction_whether_to_interaction">
<block type="interaction_whether_to_interaction" m-hide='micropython:esp32s3:mixgo_sant'>
<value name="SUB">
<shadow type="variables_get">
<field name="VAR">xsensor</field>
</shadow>
</value>
</block>
<block type="CI130X_IDENTIFY_AND_SAVE">
<block type="CI130X_IDENTIFY_AND_SAVE" m-hide='micropython:esp32s3:mixgo_sant'>
<value name="SUB">
<shadow type="variables_get">
<field name="VAR">xsensor</field>
</shadow>
</value>
</block>
<block type="CI130X_GET_WHETHER_IDENTIFY">
<block type="CI130X_GET_WHETHER_IDENTIFY" m-hide='micropython:esp32s3:mixgo_sant'>
<value name="SUB">
<shadow type="variables_get">
<field name="VAR">xsensor</field>
</shadow>
</value>
</block>
<block type="CI130X_GET_THE_RECOGNIZED_CMD">
<block type="CI130X_GET_THE_RECOGNIZED_CMD" m-hide='micropython:esp32s3:mixgo_sant'>
<value name="SUB">
<shadow type="variables_get">
<field name="VAR">xsensor</field>
</shadow>
</value>
</block>
<block type="CI130X_BROADCAST">
<block type="CI130X_BROADCAST" m-hide='micropython:esp32s3:mixgo_sant'>
<value name="SUB">
<shadow type="variables_get">
<field name="VAR">xsensor</field>
@@ -4109,11 +4055,12 @@
<block type="logic_null"></block>
</value>
</block>
<block type = "CI130X_SET_SYSTEM_CMD">
<block type = "CI130X_SET_SYSTEM_CMD" m-hide='micropython:esp32s3:mixgo_sant'>
<value name="SUB">
<shadow type="variables_get">
<field name="VAR">xsensor</field>
</shadow>
</value>
</block>
<block type="communicate_spi_init">
<value name="VAR">