diff --git a/boards.json b/boards.json index e3bf0429..72d0adc5 100644 --- a/boards.json +++ b/boards.json @@ -23,6 +23,18 @@ }, "language": "MicroPython" }, + { + "boardImg": "./boards/default/micropython_esp32c5/media/esp32c5_compressed.png", + "boardType": "Python ESP32-C5", + "boardIndex": "./boards/default/micropython_esp32c5/index.xml", + "env": { + "electron": true, + "web": true, + "webCompiler": true, + "webSocket": true + }, + "language": "MicroPython" + }, { "boardImg": "./boards/default/micropython_esp32c3/media/esp32c3_compressed.png", "boardType": "Python ESP32-C3", diff --git a/boards/default_src/micropython/blocks/actuator_onboard.js b/boards/default_src/micropython/blocks/actuator_onboard.js index d0d9cf24..5e86db27 100644 --- a/boards/default_src/micropython/blocks/actuator_onboard.js +++ b/boards/default_src/micropython/blocks/actuator_onboard.js @@ -970,6 +970,10 @@ export const set_power_output = { this.appendDummyInput() .appendField(new Blockly.FieldDropdown([["1", "1"], ["2", "2"]]), "index"); break; + case 'micropython:esp32c5:mixgo_sowl': + this.appendDummyInput() + .appendField(new Blockly.FieldDropdown([["1", "1"], ["2", "2"], ["4", "4"], ["5", "5"]]), "index"); + break; default: this.appendDummyInput() .appendField(new Blockly.FieldDropdown([["1", "1"], ["2", "2"], ["3", "3"], ["4", "4"]]), "index"); @@ -999,6 +1003,10 @@ export const get_power_output = { this.appendDummyInput() .appendField(new Blockly.FieldDropdown([["1", "1"], ["2", "2"]]), "index"); break; + case 'micropython:esp32c5:mixgo_sowl': + this.appendDummyInput() + .appendField(new Blockly.FieldDropdown([["1", "1"], ["2", "2"], ["4", "4"], ["5", "5"]]), "index"); + break; default: this.appendDummyInput() .appendField(new Blockly.FieldDropdown([["1", "1"], ["2", "2"], ["3", "3"], ["4", "4"]]), "index"); @@ -1030,6 +1038,25 @@ export const set_all_power_output = { } } +export const set_part_power_output = { + init: function () { + this.setColour(ACTUATOR_ONBOARD_HUE); + this.appendDummyInput() + .appendField(Blockly.Msg.LISTS_SET_INDEX_SET + Blockly.Msg.ME_GO_MOTOR_EXTERN) + .appendField(new Blockly.FieldDropdown([["1-2", "1"], ["4-5", "4"]]), "index"); + this.appendValueInput('duty') + .setCheck(Number) + .setAlign(Blockly.ALIGN_RIGHT) + .appendField(Blockly.Msg.blynk_IOT_IR_POWER + Blockly.Msg.MIXLY_PINMODEOUT + Blockly.Msg.MIXLY_FREQUENCY); + this.appendDummyInput() + .appendField('Hz') + this.setPreviousStatement(true, null); + this.setNextStatement(true, null); + this.setInputsInline(true); + this.setTooltip(Blockly.Msg.MIXLY_MIXBOT_MOTOR_EXTERN_TOOLTIP); + } +} + export const analog_keyboard_input = { init: function () { this.setColour(ACTUATOR_ONBOARD_HUE); diff --git a/boards/default_src/micropython/generators/actuator_onboard.js b/boards/default_src/micropython/generators/actuator_onboard.js index 25fbc133..d5619051 100644 --- a/boards/default_src/micropython/generators/actuator_onboard.js +++ b/boards/default_src/micropython/generators/actuator_onboard.js @@ -511,6 +511,15 @@ export const set_all_power_output = function (_, generator) { return code; } +export const set_part_power_output = function (_, generator) { + var version = Boards.getSelectedBoardKey().split(':')[2]; + var index = this.getFieldValue('index'); + var duty = generator.valueToCode(this, 'duty', generator.ORDER_ATOMIC); + generator.definitions_['import_' + version + '_onboard_bot'] = 'from ' + version + ' import onboard_bot'; + var code = 'onboard_bot.usben(' + index + ', freq=' + duty + ')\n'; + return code; +} + export const analog_keyboard_input = function (_, generator) { var version = Boards.getSelectedBoardKey().split(':')[2] var sp = generator.valueToCode(this, 'special', generator.ORDER_ATOMIC); diff --git a/boards/default_src/micropython_esp32c5/.npmignore b/boards/default_src/micropython_esp32c5/.npmignore new file mode 100644 index 00000000..21ab2a3e --- /dev/null +++ b/boards/default_src/micropython_esp32c5/.npmignore @@ -0,0 +1,3 @@ +node_modules +build +origin \ No newline at end of file diff --git a/boards/default_src/micropython_esp32c5/blocks/esp32_profile.js b/boards/default_src/micropython_esp32c5/blocks/esp32_profile.js new file mode 100644 index 00000000..6f06f4e9 --- /dev/null +++ b/boards/default_src/micropython_esp32c5/blocks/esp32_profile.js @@ -0,0 +1,196 @@ +import { Profile } from 'mixly'; + +const pins = {}; + +pins["元控自立"] = { + description: "MicroPython[ESP32C5 MixGo SOWL]", + digital_pin: Profile.generate(['0-14', '23-28']), + input_pin: Profile.generate(['0-14', '23-28']), + output_pin: Profile.generate(['0-14', '23-28']), + pwm_input: Profile.generate(['0-14', '23-28'], 'pwm', 'pwm'), + analog_input: Profile.generate(['1-6'], 'adc', 'adc'), + pwm_output: Profile.generate(['0-14', '23-28'], 'pwm', 'pwm'), + analog_output: Profile.generate(['1-6'], 'adc', 'adc'), + espnow_channel: Profile.generate(['1-13']), + haskylens_model: Profile.generate(['0-4']), + digital: Profile.generate(['0-14', '23-28'], 'pin', 'pin'), + pwm_pin: Profile.generate(['0-14', '23-28']), + pwm: Profile.generate(['0-14', '23-28'], 'pwm', 'pwm'), + analog_pin: Profile.generate(['1-6']), + analog: Profile.generate(['1-6'], 'adc', 'adc'), + touch: Profile.generate(['1-14'], 'tc', 'tc'), + touch_pin: Profile.generate(['1-14']), + button: [["B1", "B1key"], ["B2", "B2key"], ["A1", "A1key"], ["A2", "A2key"], ["A3", "A3key"], ["A4", "A4key"]], + buttonB: [["B1", "B1key"], ["B2", "B2key"]], + axis: Profile.generate(['0-4']), + exlcdh: Profile.generate(['0-15']), + exlcdv: Profile.generate(['0-7']), + brightness: Profile.generate(['0-9']), + tts_voice: Profile.generate(['0-16']), + tts_builtin_music: Profile.generate(['0-47']), + tts_bgmusic: Profile.generate(['0-15']), + builtinimg: [ + ["Heart", "expression_picture.Heart"], + ["Angry", "expression_picture.Angry"], + ["Bored", "expression_picture.Bored"], + ["Confused", "expression_picture.Confused"], + ["Happy", "expression_picture.Happy"], + ["Paper", "expression_picture.Paper"], + ["Rock", "expression_picture.Rock"], + ["Sad", "expression_picture.Sad"], + ["Scissors", "expression_picture.Scissors"], + ["Silly", "expression_picture.Silly"], + ["Sleep", "expression_picture.Sleep"], + ["Small_heart", "expression_picture.Small_heart"], + ["Small_paper", "expression_picture.Small_paper"], + ["Small_rock", "expression_picture.Small_rock"], + ["Small_scissors", "expression_picture.Small_scissors"], + ["Smile", "expression_picture.Smile"], + ["Surprise", "expression_picture.Surprise"], + ["Wonderful", "expression_picture.Wonderful"], + ["Eyes_Angry", "eye_picture.Eyes_Angry"], + ["Awake", "eye_picture.Awake"], + ["Black_eye", "eye_picture.Black_eye"], + ["Bottom_left", "eye_picture.Bottom_left"], + ["Bottom_right", "eye_picture.Bottom_right"], + ["Crazy_1", "eye_picture.Crazy_1"], + ["Crazy_2", "eye_picture.Crazy_2"], + ["Disappointed", "eye_picture.Disappointed"], + ["Dizzy", "eye_picture.Dizzy"], + ["Down", "eye_picture.Down"], + ["Evil", "eye_picture.Evil"], + ["Hurt", "eye_picture.Hurt"], + ["Knocked_out", "eye_picture.Knocked_out"], + ["Love", "eye_picture.Love"], + ["Middle_left", "eye_picture.Middle_left"], + ["Middle_right", "eye_picture.Middle_right"], + ["Neutral", "eye_picture.Neutral"], + ["Nuclear", "eye_picture.Nuclear"], + ["Pinch_left", "eye_picture.Pinch_left"], + ["Pinch_middle", "eye_picture.Pinch_middle"], + ["Pinch_right", "eye_picture.Pinch_right"], + ["Tear", "eye_picture.Tear"], + ["Tired_left", "eye_picture.Tired_left"], + ["Tired_middle", "eye_picture.Tired_middle"], + ["Tired_right", "eye_picture.Tired_right"], + ["Toxic", "eye_picture.Toxic"], + ["Up", "eye_picture.Up"], + ["Winking", "eye_picture.Winking"], + ["Accept", "informatio_picture.Accept"], + ["Backward", "informatio_picture.Backward"], + ["Decline", "informatio_picture.Decline"], + ["Forward", "informatio_picture.Forward"], + ["Left", "informatio_picture.Left"], + ["No_go", "informatio_picture.No_go"], + ["Question_mark", "informatio_picture.Question_mark"], + ["Right", "informatio_picture.Right"], + ["Stop_1", "informatio_picture.Stop_1"], + ["Stop_2", "informatio_picture.Stop_2"], + ["Thumbs_down", "informatio_picture.Thumbs_down"], + ["Thumbs_up", "informatio_picture.Thumbs_up"], + ["Warning", "informatio_picture.Warning"], + ["Bomb", "object_picture.Bomb"], + ["Boom", "object_picture.Boom"], + ["DOOR_CLOSE", "object_picture.DOOR_CLOSE"], + ["DOOR_OPEN", "object_picture.DOOR_OPEN"], + ["DOOR_OPENING", "object_picture.DOOR_OPENING"], + ["Fire", "object_picture.Fire"], + ["Flowers", "object_picture.Flowers"], + ["Forest", "object_picture.Forest"], + ["Lightning", "object_picture.Lightning"], + ["Light_off", "object_picture.Light_off"], + ["Light_on", "object_picture.Light_on"], + ["Night", "object_picture.Night"], + ["Pirate", "object_picture.Pirate"], + ["Snow", "object_picture.Snow"], + ["Target", "object_picture.Target"], + ["Bar_0", "progres_picture.Bar_0"], + ["Bar_1", "progres_picture.Bar_1"], + ["Bar_2", "progres_picture.Bar_2"], + ["Bar_3", "progres_picture.Bar_3"], + ["Bar_4", "progres_picture.Bar_4"], + ["Dial_0", "progres_picture.Dial_0"], + ["Dial_1", "progres_picture.Dial_1"], + ["Dial_2", "progres_picture.Dial_2"], + ["Dial_3", "progres_picture.Dial_3"], + ["Dial_4", "progres_picture.Dial_4"], + ["Dots_0", "progres_picture.Dots_0"], + ["Dots_1", "progres_picture.Dots_1"], + ["Dots_2", "progres_picture.Dots_2"], + ["Dots_3", "progres_picture.Dots_3"], + ["Hourglass_0", "progres_picture.Hourglass_0"], + ["Hourglass_1", "progres_picture.Hourglass_1"], + ["Hourglass_2", "progres_picture.Hourglass_2"], + ["Timer_0", "progres_picture.Timer_0"], + ["Timer_1", "progres_picture.Timer_1"], + ["Timer_2", "progres_picture.Timer_2"], + ["Timer_3", "progres_picture.Timer_3"], + ["Timer_4", "progres_picture.Timer_4"], + ["Water_level_0", "progres_picture.Water_level_0"], + ["Water_level_1", "progres_picture.Water_level_1"], + ["Water_level_2", "progres_picture.Water_level_2"], + ["Water_level_3", "progres_picture.Water_level_3"], + ["YES", "informatio_picture.YES"], + ["NO", "informatio_picture.NO"] + ], + builtinimg_extern: [["HEART", "matrix32x12.Matrix.HEART"], ["HEART_SMALL", "matrix32x12.Matrix.HEART_SMALL"], ["HAPPY", "matrix32x12.Matrix.HAPPY"], ["SAD", "matrix32x12.Matrix.SAD"], ["SMILE", "matrix32x12.Matrix.SMILE"], ["SILLY", "matrix32x12.Matrix.SILLY"], ["FABULOUS", "matrix32x12.Matrix.FABULOUS"], ["SURPRISED", "matrix32x12.Matrix.SURPRISED"], ["ASLEEP", "matrix32x12.Matrix.ASLEEP"], ["ANGRY", "matrix32x12.Matrix.ANGRY"], ["CONFUSED", "matrix32x12.Matrix.CONFUSED"], ["NO", "matrix32x12.Matrix.NO"], ["YES", "matrix32x12.Matrix.YES"], ["LEFT_ARROW", "matrix32x12.Matrix.LEFT_ARROW"], ["RIGHT_ARROW", "matrix32x12.Matrix.RIGHT_ARROW"], ["DRESS", "matrix32x12.Matrix.DRESS"], ["TRANSFORMERS", "matrix32x12.Matrix.TRANSFORMERS"], ["SCISSORS", "matrix32x12.Matrix.SCISSORS"], ["EXIT", "matrix32x12.Matrix.EXIT"], ["TREE", "matrix32x12.Matrix.TREE"], ["PACMAN", "matrix32x12.Matrix.PACMAN"], ["TARGET", "matrix32x12.Matrix.TARGET"], ["TSHIRT", "matrix32x12.Matrix.TSHIRT"], ["ROLLERSKATE", "matrix32x12.Matrix.ROLLERSKATE"], ["DUCK", "matrix32x12.Matrix.DUCK"], ["HOUSE", "matrix32x12.Matrix.HOUSE"], ["TORTOISE", "matrix32x12.Matrix.TORTOISE"], ["BUTTERFLY", "matrix32x12.Matrix.BUTTERFLY"], ["STICKFIGURE", "matrix32x12.Matrix.STICKFIGURE"], ["GHOST", "matrix32x12.Matrix.GHOST"], ["PITCHFORK", "matrix32x12.Matrix.PITCHFORK"], ["onboard_music_QUAVERS", "matrix32x12.Matrix.onboard_music_QUAVERS"], ["onboard_music_QUAVER", "matrix32x12.Matrix.onboard_music_QUAVER"], ["onboard_music_CROTCHET", "matrix32x12.Matrix.onboard_music_CROTCHET"], ["COW", "matrix32x12.Matrix.COW"], ["RABBIT", "matrix32x12.Matrix.RABBIT"], ["SQUARE_SMALL", "matrix32x12.Matrix.SQUARE_SMALL"], ["SQUARE", "matrix32x12.Matrix.SQUARE"], ["DIAMOND_SMALL", "matrix32x12.Matrix.DIAMOND_SMALL"], ["DIAMOND", "matrix32x12.Matrix.DIAMOND"], ["CHESSBOARD", "matrix32x12.Matrix.CHESSBOARD"], ["TRIANGLE_LEFT", "matrix32x12.Matrix.TRIANGLE_LEFT"], ["TRIANGLE", "matrix32x12.Matrix.TRIANGLE"], ["SNAKE", "matrix32x12.Matrix.SNAKE"], ["UMBRELLA", "matrix32x12.Matrix.UMBRELLA"], ["SKULL", "matrix32x12.Matrix.SKULL"], ["GIRAFFE", "matrix32x12.Matrix.GIRAFFE"], ["SWORD", "matrix32x12.Matrix.SWORD"]], + imglist: [["ALL_CLOCKS", "matrix.Image.ALL_CLOCKS"], ["ALL_ARROWS", "matrix.Image.ALL_ARROWS"]], + playlist: [["DADADADUM", "onboard_music.DADADADUM"], ["ENTERTAINER", "onboard_music.ENTERTAINER"], ["PRELUDE", "onboard_music.PRELUDE"], ["ODE", "onboard_music.ODE"], ["NYAN", "onboard_music.NYAN"], ["RINGTONE", "onboard_music.RINGTONE"], ["FUNK", "onboard_music.FUNK"], ["BLUES", "onboard_music.BLUES"], ["BIRTHDAY", "onboard_music.BIRTHDAY"], ["WEDDING", "onboard_music.WEDDING"], ["FUNERAL", "onboard_music.FUNERAL"], ["PUNCHLINE", "onboard_music.PUNCHLINE"], ["PYTHON", "onboard_music.PYTHON"], ["BADDY", "onboard_music.BADDY"], ["CHASE", "onboard_music.CHASE"], ["BA_DING", "onboard_music.BA_DING"], ["WAWAWAWAA", "onboard_music.WAWAWAWAA"], ["JUMP_UP", "onboard_music.JUMP_UP"], ["JUMP_DOWN", "onboard_music.JUMP_DOWN"], ["POWER_UP", "onboard_music.POWER_UP"], ["POWER_DOWN", "onboard_music.POWER_DOWN"]], + playlist_extern: [["DADADADUM", "DADADADUM"], ["ENTERTAINER", "ENTERTAINER"], ["PRELUDE", "PRELUDE"], ["ODE", "ODE"], ["NYAN", "NYAN"], ["RINGTONE", "RINGTONE"], ["FUNK", "FUNK"], ["BLUES", "BLUES"], ["BIRTHDAY", "BIRTHDAY"], ["WEDDING", "WEDDING"], ["FUNERAL", "FUNERAL"], ["PUNCHLINE", "PUNCHLINE"], ["PYTHON", "PYTHON"], ["BADDY", "BADDY"], ["CHASE", "CHASE"], ["BA_DING", "BA_DING"], ["WAWAWAWAA", "WAWAWAWAA"], ["JUMP_UP", "JUMP_UP"], ["JUMP_DOWN", "JUMP_DOWN"], ["POWER_UP", "POWER_UP"], ["POWER_DOWN", "POWER_DOWN"]], + tone_notes: [ + ["NOTE_C3", "131"], ["NOTE_D3", "147"], ["NOTE_E3", "165"], ["NOTE_F3", "175"], ["NOTE_G3", "196"], ["NOTE_A3", "220"], ["NOTE_B3", "247"], + ["NOTE_C4", "262"], ["NOTE_D4", "294"], ["NOTE_E4", "330"], ["NOTE_F4", "349"], ["NOTE_G4", "392"], ["NOTE_A4", "440"], ["NOTE_B4", "494"], + ["NOTE_C5", "523"], ["NOTE_D5", "587"], ["NOTE_E5", "659"], ["NOTE_F5", "698"], ["NOTE_G5", "784"], ["NOTE_A5", "880"], ["NOTE_B5", "988"] + ], + serial_pin: [["pin0", "0"], ["pin1", "1"], ["pin2", "2"], ["pin8", "8"], ["pin12", "12"], ["pin13", "13"], ["pin14", "14"], ["pin15", "15"], ["pin16", "16"]], + radio_power: [['0', '0'], ['1', '1'], ['2', '2'], ['3', '3'], ['4', '4'], ['5', '5'], ['6', '6'], ['7', '7']], + radio_datarate: [["1Mbit", "RATE_1MBIT"], ["250Kbit", "RATE_250KBIT"], ["2Mbit", "RATE_2MBIT"]], + one_more: [["ONE_SHOT", "ONE_SHOT"], ["PERIODIC", "PERIODIC"]], + digital_dot: [["0", "0"], ["1", "1"], ["2", "2"]], +}; + +pins["ESP32C5 Generic"] = { + description: "MicroPython[ESP32C5 Generic]", + digital_pin: Profile.generate(['0-14', '23-28']), + input_pin: Profile.generate(['0-14', '23-28']), + output_pin: Profile.generate(['0-14', '23-28']), + pwm_input: Profile.generate(['0-14', '23-28'], 'pwm', 'pwm'), + analog_input: Profile.generate(['1-6'], 'adc', 'adc'), + pwm_output: Profile.generate(['0-14', '23-28'], 'pwm', 'pwm'), + analog_output: Profile.generate(['1-6'], 'adc', 'adc'), + espnow_channel: Profile.generate(['1-13']), + haskylens_model: Profile.generate(['0-4']), + digital: Profile.generate(['0-14', '23-28'], 'pin', 'pin'), + pwm_pin: Profile.generate(['0-14', '23-28']), + pwm: Profile.generate(['0-14', '23-28'], 'pwm', 'pwm'), + analog_pin: Profile.generate(['1-6']), + analog: Profile.generate(['1-6'], 'adc', 'adc'), + touch: Profile.generate(['1-14'], 'tc', 'tc'), + touch_pin: Profile.generate(['1-14']), + button: [["B1", "B1key"], ["B2", "B2key"], ["A1", "A1key"], ["A2", "A2key"], ["A3", "A3key"], ["A4", "A4key"]], + buttonB: [["B1", "B1key"], ["B2", "B2key"]], + axis: Profile.generate(['0-4']), + exlcdh: Profile.generate(['0-15']), + exlcdv: Profile.generate(['0-7']), + brightness: Profile.generate(['0-9']), + tts_voice: Profile.generate(['0-16']), + tts_builtin_music: Profile.generate(['0-47']), + tts_bgmusic: Profile.generate(['0-15']), + builtinimg: pins["元控自立"].builtinimg, + builtinimg_extern: [["HEART", "matrix32x12.Matrix.HEART"], ["HEART_SMALL", "matrix32x12.Matrix.HEART_SMALL"], ["HAPPY", "matrix32x12.Matrix.HAPPY"], ["SAD", "matrix32x12.Matrix.SAD"], ["SMILE", "matrix32x12.Matrix.SMILE"], ["SILLY", "matrix32x12.Matrix.SILLY"], ["FABULOUS", "matrix32x12.Matrix.FABULOUS"], ["SURPRISED", "matrix32x12.Matrix.SURPRISED"], ["ASLEEP", "matrix32x12.Matrix.ASLEEP"], ["ANGRY", "matrix32x12.Matrix.ANGRY"], ["CONFUSED", "matrix32x12.Matrix.CONFUSED"], ["NO", "matrix32x12.Matrix.NO"], ["YES", "matrix32x12.Matrix.YES"], ["LEFT_ARROW", "matrix32x12.Matrix.LEFT_ARROW"], ["RIGHT_ARROW", "matrix32x12.Matrix.RIGHT_ARROW"], ["DRESS", "matrix32x12.Matrix.DRESS"], ["TRANSFORMERS", "matrix32x12.Matrix.TRANSFORMERS"], ["SCISSORS", "matrix32x12.Matrix.SCISSORS"], ["EXIT", "matrix32x12.Matrix.EXIT"], ["TREE", "matrix32x12.Matrix.TREE"], ["PACMAN", "matrix32x12.Matrix.PACMAN"], ["TARGET", "matrix32x12.Matrix.TARGET"], ["TSHIRT", "matrix32x12.Matrix.TSHIRT"], ["ROLLERSKATE", "matrix32x12.Matrix.ROLLERSKATE"], ["DUCK", "matrix32x12.Matrix.DUCK"], ["HOUSE", "matrix32x12.Matrix.HOUSE"], ["TORTOISE", "matrix32x12.Matrix.TORTOISE"], ["BUTTERFLY", "matrix32x12.Matrix.BUTTERFLY"], ["STICKFIGURE", "matrix32x12.Matrix.STICKFIGURE"], ["GHOST", "matrix32x12.Matrix.GHOST"], ["PITCHFORK", "matrix32x12.Matrix.PITCHFORK"], ["onboard_music_QUAVERS", "matrix32x12.Matrix.onboard_music_QUAVERS"], ["onboard_music_QUAVER", "matrix32x12.Matrix.onboard_music_QUAVER"], ["onboard_music_CROTCHET", "matrix32x12.Matrix.onboard_music_CROTCHET"], ["COW", "matrix32x12.Matrix.COW"], ["RABBIT", "matrix32x12.Matrix.RABBIT"], ["SQUARE_SMALL", "matrix32x12.Matrix.SQUARE_SMALL"], ["SQUARE", "matrix32x12.Matrix.SQUARE"], ["DIAMOND_SMALL", "matrix32x12.Matrix.DIAMOND_SMALL"], ["DIAMOND", "matrix32x12.Matrix.DIAMOND"], ["CHESSBOARD", "matrix32x12.Matrix.CHESSBOARD"], ["TRIANGLE_LEFT", "matrix32x12.Matrix.TRIANGLE_LEFT"], ["TRIANGLE", "matrix32x12.Matrix.TRIANGLE"], ["SNAKE", "matrix32x12.Matrix.SNAKE"], ["UMBRELLA", "matrix32x12.Matrix.UMBRELLA"], ["SKULL", "matrix32x12.Matrix.SKULL"], ["GIRAFFE", "matrix32x12.Matrix.GIRAFFE"], ["SWORD", "matrix32x12.Matrix.SWORD"]], + imglist: [["ALL_CLOCKS", "matrix.Image.ALL_CLOCKS"], ["ALL_ARROWS", "matrix.Image.ALL_ARROWS"]], + playlist: [["DADADADUM", ".DADADADUM"], ["ENTERTAINER", ".ENTERTAINER"], ["PRELUDE", ".PRELUDE"], ["ODE", ".ODE"], ["NYAN", ".NYAN"], ["RINGTONE", ".RINGTONE"], ["FUNK", ".FUNK"], ["BLUES", ".BLUES"], ["BIRTHDAY", ".BIRTHDAY"], ["WEDDING", ".WEDDING"], ["FUNERAL", ".FUNERAL"], ["PUNCHLINE", ".PUNCHLINE"], ["PYTHON", ".PYTHON"], ["BADDY", ".BADDY"], ["CHASE", ".CHASE"], ["BA_DING", ".BA_DING"], ["WAWAWAWAA", ".WAWAWAWAA"], ["JUMP_UP", ".JUMP_UP"], ["JUMP_DOWN", ".JUMP_DOWN"], ["POWER_UP", ".POWER_UP"], ["POWER_DOWN", ".POWER_DOWN"]], + playlist_extern: [["DADADADUM", "DADADADUM"], ["ENTERTAINER", "ENTERTAINER"], ["PRELUDE", "PRELUDE"], ["ODE", "ODE"], ["NYAN", "NYAN"], ["RINGTONE", "RINGTONE"], ["FUNK", "FUNK"], ["BLUES", "BLUES"], ["BIRTHDAY", "BIRTHDAY"], ["WEDDING", "WEDDING"], ["FUNERAL", "FUNERAL"], ["PUNCHLINE", "PUNCHLINE"], ["PYTHON", "PYTHON"], ["BADDY", "BADDY"], ["CHASE", "CHASE"], ["BA_DING", "BA_DING"], ["WAWAWAWAA", "WAWAWAWAA"], ["JUMP_UP", "JUMP_UP"], ["JUMP_DOWN", "JUMP_DOWN"], ["POWER_UP", "POWER_UP"], ["POWER_DOWN", "POWER_DOWN"]], + tone_notes: [ + ["NOTE_C3", "131"], ["NOTE_D3", "147"], ["NOTE_E3", "165"], ["NOTE_F3", "175"], ["NOTE_G3", "196"], ["NOTE_A3", "220"], ["NOTE_B3", "247"], + ["NOTE_C4", "262"], ["NOTE_D4", "294"], ["NOTE_E4", "330"], ["NOTE_F4", "349"], ["NOTE_G4", "392"], ["NOTE_A4", "440"], ["NOTE_B4", "494"], + ["NOTE_C5", "523"], ["NOTE_D5", "587"], ["NOTE_E5", "659"], ["NOTE_F5", "698"], ["NOTE_G5", "784"], ["NOTE_A5", "880"], ["NOTE_B5", "988"] + ], + serial_pin: [["pin0", "0"], ["pin1", "1"], ["pin2", "2"], ["pin8", "8"], ["pin12", "12"], ["pin13", "13"], ["pin14", "14"], ["pin15", "15"], ["pin16", "16"]], + radio_power: [['0', '0'], ['1', '1'], ['2', '2'], ['3', '3'], ['4', '4'], ['5', '5'], ['6', '6'], ['7', '7']], + radio_datarate: [["1Mbit", "RATE_1MBIT"], ["250Kbit", "RATE_250KBIT"], ["2Mbit", "RATE_2MBIT"]], + one_more: [["ONE_SHOT", "ONE_SHOT"], ["PERIODIC", "PERIODIC"]], + digital_dot: [["0", "0"], ["1", "1"], ["2", "2"]], +}; + +export default pins; \ No newline at end of file diff --git a/boards/default_src/micropython_esp32c5/blocks/inout.js b/boards/default_src/micropython_esp32c5/blocks/inout.js new file mode 100644 index 00000000..e9aa5243 --- /dev/null +++ b/boards/default_src/micropython_esp32c5/blocks/inout.js @@ -0,0 +1,259 @@ +import * as Blockly from 'blockly/core'; + +const BASE_HUE = 20; //'#ae3838';//40; + +export const inout_highlow = { + init: function () { + this.setColour(BASE_HUE); + this.appendDummyInput("") + .appendField(new Blockly.FieldDropdown([[Blockly.Msg.MIXLY_HIGH, "HIGH"], [Blockly.Msg.MIXLY_LOW, "LOW"]]), 'BOOL') + this.setOutput(true, Boolean); + this.setTooltip(Blockly.Msg.MIXLY_ESP32_INOUT_HIGHLOW_TOOLTIP); + } +}; + +export const inout_digital_write = { + init: function () { + this.setColour(BASE_HUE); + this.appendValueInput("PIN", Number) + .appendField(Blockly.Msg.MIXLY_Digital_PINMODEOUT) + .setCheck(Number); + this.appendValueInput("STAT") + .appendField(Blockly.Msg.MIXLY_STAT) + .setCheck([Number, Boolean]); + this.setPreviousStatement(true, null); + this.setNextStatement(true, null); + this.setInputsInline(true); + this.setTooltip(Blockly.Msg.MIXLY_ESP32_INOUT_DIGITAL_WRITE_TOOLTIP); + } +}; + +export const inout_digital_read = { + init: function () { + this.setColour(BASE_HUE); + this.appendValueInput("PIN", Number) + .appendField(Blockly.Msg.MIXLY_MICROBIT_PY_STORAGE_GET) + .appendField(Blockly.Msg.MIXLY_Digital_PINMODEIN) + .setCheck(Number); + this.appendDummyInput() + .appendField(Blockly.Msg.MIXLY_ESP32_MACHINE_VALUE) + this.setInputsInline(true); + this.setOutput(true, [Boolean, Number]); + this.setTooltip(Blockly.Msg.MIXLY_ESP32_INOUT_DIGITAL_READ_TOOLTIP); + } +}; + +export const inout_analog_write = { + init: function () { + this.setColour(BASE_HUE); + this.appendValueInput("PIN", Number) + .appendField("DAC" + Blockly.Msg.MIXLY_Analog_PINMODEOUT) + .setCheck(Number); + this.appendValueInput("NUM", Number) + .appendField(Blockly.Msg.MIXLY_VALUE2) + .setCheck(Number); + this.setInputsInline(true); + this.setPreviousStatement(true, null); + this.setNextStatement(true, null); + this.setTooltip(Blockly.Msg.MIXLY_ESP32_INOUT_ANALOG_WRITE_TOOLTIP); + } +}; + +export const inout_analog_write_set = { + init: function () { + this.setColour(BASE_HUE); + this.appendValueInput("PIN", Number) + .appendField(Blockly.Msg.MIXLY_Analog_PINMODEOUT) + .setCheck(Number); + this.appendDummyInput() + .appendField(Blockly.Msg.MIXLY_MICROBIT_JS_PERIOD_MIL) + .appendField(new Blockly.FieldDropdown([ + [Blockly.Msg.MIXLY_mSecond, "period"], + [Blockly.Msg.MIXLY_uSecond, "period_microseconds"] + ]), "key"); + this.appendValueInput("NUM", Number) + .appendField(Blockly.Msg.MIXLY_STAT) + .setCheck(Number); + this.setInputsInline(true); + this.setPreviousStatement(true, null); + this.setNextStatement(true, null); + this.setTooltip(Blockly.Msg.MIXLY_ESP32_INOUT_ANALOG_WRITE_SET_TOOLTIP); + } +}; + +export const inout_analog_atten = { + init: function () { + this.setColour(BASE_HUE); + this.appendValueInput("PIN", Number) + .appendField(Blockly.Msg.MIXLY_Analog_PINMODEIN) + .setCheck(Number); + this.appendDummyInput("") + .appendField(Blockly.Msg.MIXLY_ESP32_REF_VOLTAGE + Blockly.Msg.MIXLY_STAT) + .appendField(new Blockly.FieldDropdown([ + ["3.3V", "machine.ADC.ATTN_11DB"], + ["2.2V", "machine.ADC.ATTN_6DB"], + ["1.5V", "machine.ADC.ATTN_2_5DB"], + ["1.2V", "machine.ADC.ATTN_0DB"] + ]), "atten"); + this.setInputsInline(true); + this.setPreviousStatement(true, null); + this.setNextStatement(true, null); + this.setTooltip(Blockly.Msg.MIXLY_ESP32_INOUT_ANALOG_ATTEN_TOOLTIP); + } +}; + + +export const inout_pin_pressed = { + init: function () { + this.setColour(BASE_HUE); + this.appendValueInput('pin') + .appendField(Blockly.Msg.MIXLY_MICROBIT_PY_STORAGE_GET) + .appendField(Blockly.Msg.MIXLY_ESP32_TOUCH_SENSOR); + // this.appendDummyInput() + // .appendField(Blockly.Msg.MIXLY_IS_TOUCHED); + this.appendDummyInput() + .appendField(Blockly.Msg.MIXLY_ESP32_MACHINE_VALUE) + this.setOutput(true, Number); + this.setInputsInline(true); + this.setTooltip(Blockly.Msg.MIXLY_ESP32_INOUT_PIN_PRESSED_TOOLTIP); + } +}; + +export const inout_pin_attachInterrupt = { + init: function () { + this.setColour(20); + this.appendValueInput("PIN", Number) + .appendField(Blockly.Msg.MIXLY_ATTACHINTERRUPT_PIN) + .setCheck(Number); + this.appendDummyInput("") + .appendField(Blockly.Msg.MIXLY_MODE) + .appendField(new Blockly.FieldDropdown([[Blockly.Msg.MIXLY_RISING, "machine.Pin.IRQ_RISING"], [Blockly.Msg.MIXLY_FALLING, "machine.Pin.IRQ_FALLING"], [Blockly.Msg.MIXLY_CHANGE, "(machine.Pin.IRQ_RISING | machine.Pin.IRQ_FALLING)"]]), "mode"); + this.appendValueInput('DO') + .appendField(Blockly.Msg.MIXLY_DO) + this.setPreviousStatement(true); + this.setNextStatement(true); + this.setTooltip(Blockly.Msg.MIXLY_ESP32_INOUT_PIN_ATTACHINTERRUPT_TOOLTIP); + } +}; + +export const inout_digital_init = { + init: function () { + this.setColour(20); + this.appendDummyInput() + .appendField(Blockly.Msg.MIXLY_SETUP) + .appendField(new Blockly.FieldTextInput('pin#'), 'PIN_OBJ'); + this.appendDummyInput("") + .appendField(Blockly.Msg.MIXLY_MICROPYTHON_AS) + // .appendField(Blockly.Msg.MIXLY_MICROBIT_PY_STORAGE_MODE+Blockly.Msg.LISTS_SET_INDEX_INPUT_TO) + .appendField(new Blockly.FieldDropdown([ + [Blockly.Msg.MIXLY_Digital_PINMODEOUT, "machine.Pin.OUT"], + [Blockly.Msg.MIXLY_Digital_PINMODEIN, "machine.Pin.IN"], + [Blockly.Msg.MIXLY_PINMODEPULLUP, "machine.Pin.IN, machine.Pin.PULL_UP"], + [Blockly.Msg.MIXLY_PINMODEPULLDOWN, "machine.Pin.IN, machine.Pin.PULL_DOWN"] + ]), "MODE") + this.appendValueInput("PIN", Number) + .appendField(Blockly.Msg.MIXLY_PIN) + .setCheck(Number); + this.setPreviousStatement(true, null); + this.setNextStatement(true, null); + this.setInputsInline(true); + this.setTooltip(Blockly.Msg.MIXLY_ESP32_INOUT_DIGITAL_INIT_TOOLTIP); + }, + getVars: function () { + return [this.getFieldValue('PIN_OBJ') == 'pin#' ? null : this.getFieldValue('PIN_OBJ')]; + }, + renameVar: function (oldName, newName) { + if (Blockly.Names.equals(oldName, this.getFieldValue('PIN_OBJ'))) { + this.setTitleValue(newName, 'PIN_OBJ'); + } + } +}; + +export const inout_analog_write_init = { + init: function () { + this.setColour(BASE_HUE); + // this.appendValueInput("PIN", Number) + // .appendField(Blockly.Msg.MIXLY_SETUP) + // .appendField("PWM"+Blockly.Msg.MIXLY_Analog_PINMODEOUT) + // .appendField('pwm') + // .setCheck(Number); + this.appendDummyInput("") + .appendField(Blockly.Msg.MIXLY_SETUP) + .appendField(new Blockly.FieldTextInput('dac#'), 'PIN_OBJ') + .appendField(Blockly.Msg.MIXLY_MICROPYTHON_AS) + this.appendDummyInput("") + .appendField("DAC" + Blockly.Msg.MIXLY_Analog_PINMODEOUT) + // .appendField('dac') + // .appendField(new Blockly.FieldDropdown(profile.default.dac_pin),"PIN") + this.appendValueInput("PIN", Number) + .appendField(Blockly.Msg.MIXLY_PIN) + .setCheck(Number); + this.setInputsInline(true); + this.setPreviousStatement(true, null); + this.setNextStatement(true, null); + this.setTooltip(Blockly.Msg.MIXLY_ESP32_INOUT_ANALOG_WRITE_INIT_TOOLTIP); + }, + getVars: function () { + return [this.getFieldValue('PIN_OBJ') == 'dac#' ? null : this.getFieldValue('PIN_OBJ')]; + }, + renameVar: function (oldName, newName) { + if (Blockly.Names.equals(oldName, this.getFieldValue('PIN_OBJ'))) { + this.setTitleValue(newName, 'PIN_OBJ'); + } + } +}; + +export const inout_pin_pressed_init = { + init: function () { + this.setColour(BASE_HUE); + // this.appendValueInput("PIN", Number) + // .appendField(Blockly.Msg.MIXLY_SETUP) + // .appendField("PWM"+Blockly.Msg.MIXLY_Analog_PINMODEOUT) + // .appendField('pwm') + // .setCheck(Number); + this.appendDummyInput("") + .appendField(Blockly.Msg.MIXLY_SETUP) + .appendField(new Blockly.FieldTextInput('tc#'), 'PIN_OBJ') + .appendField(Blockly.Msg.MIXLY_MICROPYTHON_AS) + this.appendDummyInput("") + .appendField(Blockly.Msg.MIXLY_ESP32_TOUCH_SENSOR) + // .appendField('tc') + // .appendField(new Blockly.FieldDropdown(profile.default.tc_pin),"PIN") + this.appendValueInput("PIN", Number) + .appendField(Blockly.Msg.MIXLY_PIN) + .setCheck(Number); + this.setInputsInline(true); + this.setPreviousStatement(true, null); + this.setNextStatement(true, null); + this.setTooltip(Blockly.Msg.MIXLY_ESP32_INOUT_PIN_PRESSED_INIT_TOOLTIP); + }, + getVars: function () { + return [this.getFieldValue('PIN_OBJ') == 'tc#' ? null : this.getFieldValue('PIN_OBJ')]; + }, + renameVar: function (oldName, newName) { + if (Blockly.Names.equals(oldName, this.getFieldValue('PIN_OBJ'))) { + this.setTitleValue(newName, 'PIN_OBJ'); + } + } +}; + +export const inout_analog_write_set_freq = { + init: function () { + this.setColour(BASE_HUE); + this.appendValueInput("PIN", Number) + .appendField("PWM" + Blockly.Msg.MIXLY_Analog_PINMODEOUT) + .setCheck(Number); + this.appendValueInput("NUM", Number) + .appendField(Blockly.Msg.MIXLY_FREQUENCY + Blockly.Msg.MIXLY_STAT) + .setCheck(Number); + this.setInputsInline(true); + this.setPreviousStatement(true, null); + this.setNextStatement(true, null); + this.setTooltip(Blockly.Msg.MIXLY_ESP32_INOUT_PWM_ANALOG_WRITE_SET_FREQ_TOOLTIP); + } +}; + +export const inout_pinMode = inout_digital_init; +export const pin_pressed_init = inout_pin_pressed_init; +export const pin_pressed = inout_pin_pressed; +export const controls_pin_attachInterrupt = inout_pin_attachInterrupt; diff --git a/boards/default_src/micropython_esp32c5/blocks/pins.js b/boards/default_src/micropython_esp32c5/blocks/pins.js new file mode 100644 index 00000000..d46361c9 --- /dev/null +++ b/boards/default_src/micropython_esp32c5/blocks/pins.js @@ -0,0 +1,415 @@ +import * as Blockly from 'blockly/core'; +import { Profile } from 'mixly'; + +const PINS_HUE = 230; + +export const pins_digital = { + init: function () { + this.setColour(PINS_HUE); + this.appendDummyInput("") + .appendField(new Blockly.FieldDropdown(Profile.default.digital), 'PIN'); + this.setOutput(true); + } +}; + +export const pins_digital_pin = { + init: function () { + this.setColour(PINS_HUE); + this.appendDummyInput("") + .appendField(new Blockly.FieldDropdown(Profile.default.digital_pin), 'PIN'); + this.setOutput(true, Number); + } +}; + +export const pins_input_pin = { + init: function () { + this.setColour(PINS_HUE); + this.appendDummyInput("") + .appendField(new Blockly.FieldDropdown(Profile.default.input_pin), 'PIN'); + this.setOutput(true, Number); + } +}; + +export const pins_output_pin = { + init: function () { + this.setColour(PINS_HUE); + this.appendDummyInput("") + .appendField(new Blockly.FieldDropdown(Profile.default.output_pin), 'PIN'); + this.setOutput(true, Number); + } +}; + +export const espnow_channel = { + init: function () { + this.setColour(PINS_HUE); + this.appendDummyInput("") + .appendField(new Blockly.FieldDropdown(Profile.default.espnow_channel), 'PIN'); + this.setOutput(true, Number); + } +}; + +export const haskylens_model = { + init: function () { + this.setColour(PINS_HUE); + this.appendDummyInput("") + .appendField(new Blockly.FieldDropdown(Profile.default.haskylens_model), 'PIN'); + this.setOutput(true, Number); + } +}; + +export const pwm_input = { + init: function () { + this.setColour(PINS_HUE); + this.appendDummyInput("") + .appendField(new Blockly.FieldDropdown(Profile.default.pwm_input), 'PIN'); + this.setOutput(true); + } +}; + +export const analog_input = { + init: function () { + this.setColour(PINS_HUE); + this.appendDummyInput("") + .appendField(new Blockly.FieldDropdown(Profile.default.analog_input), 'PIN'); + this.setOutput(true); + } +}; + +export const pwm_output = { + init: function () { + this.setColour(PINS_HUE); + this.appendDummyInput("") + .appendField(new Blockly.FieldDropdown(Profile.default.pwm_output), 'PIN'); + this.setOutput(true); + } +}; + +export const analog_output = { + init: function () { + this.setColour(PINS_HUE); + this.appendDummyInput("") + .appendField(new Blockly.FieldDropdown(Profile.default.analog_output), 'PIN'); + this.setOutput(true); + } +}; + +export const i2c_A_pin = { + init: function () { + this.setColour(PINS_HUE); + this.appendDummyInput("") + .appendField(new Blockly.FieldDropdown(Profile.default.i2c_A_pin), 'PIN'); + this.setOutput(true, Number); + } +}; + +export const i2c_B_pin = { + init: function () { + this.setColour(PINS_HUE); + this.appendDummyInput("") + .appendField(new Blockly.FieldDropdown(Profile.default.i2c_B_pin), 'PIN'); + this.setOutput(true, Number); + } +}; + + +export const spi_A_pin = { + init: function () { + this.setColour(PINS_HUE); + this.appendDummyInput("") + .appendField(new Blockly.FieldDropdown(Profile.default.spi_A_pin), 'PIN'); + this.setOutput(true, Number); + } +}; + +export const spi_B_pin = { + init: function () { + this.setColour(PINS_HUE); + this.appendDummyInput("") + .appendField(new Blockly.FieldDropdown(Profile.default.spi_B_pin), 'PIN'); + this.setOutput(true, Number); + } +}; + +export const spi_C_pin = { + init: function () { + this.setColour(PINS_HUE); + this.appendDummyInput("") + .appendField(new Blockly.FieldDropdown(Profile.default.spi_C_pin), 'PIN'); + this.setOutput(true, Number); + } +}; + +export const spi_D_pin = { + init: function () { + this.setColour(PINS_HUE); + this.appendDummyInput("") + .appendField(new Blockly.FieldDropdown(Profile.default.spi_D_pin), 'PIN'); + this.setOutput(true, Number); + } +}; + +export const pins_analog = { + init: function () { + this.setColour(PINS_HUE); + this.appendDummyInput("") + .appendField(new Blockly.FieldDropdown(Profile.default.analog), 'PIN'); + this.setOutput(true); + } +}; + +export const pins_analog_pin = { + init: function () { + this.setColour(PINS_HUE); + this.appendDummyInput("") + .appendField(new Blockly.FieldDropdown(Profile.default.analog_pin), 'PIN'); + this.setOutput(true, Number); + } +}; + +export const pins_dac = { + init: function () { + this.setColour(PINS_HUE); + this.appendDummyInput("") + .appendField(new Blockly.FieldDropdown(Profile.default.dac), 'PIN'); + this.setOutput(true); + } +}; + +export const pins_dac_pin = { + init: function () { + this.setColour(PINS_HUE); + this.appendDummyInput("") + .appendField(new Blockly.FieldDropdown(Profile.default.dac_pin), 'PIN'); + this.setOutput(true, Number); + } +}; + +export const pins_button = { + init: function () { + this.setColour(PINS_HUE); + this.appendDummyInput("") + .appendField(new Blockly.FieldDropdown(Profile.default.button), 'PIN'); + this.setOutput(true, Number); + } +}; + +export const pins_buttonB = { + init: function () { + this.setColour(PINS_HUE); + this.appendDummyInput("") + .appendField(new Blockly.FieldDropdown(Profile.default.buttonB), 'PIN'); + this.setOutput(true, Number); + } +}; + +export const pins_pwm = { + init: function () { + this.setColour(PINS_HUE); + this.appendDummyInput("") + .appendField(new Blockly.FieldDropdown(Profile.default.pwm), 'PIN'); + this.setOutput(true); + } +}; + +export const pins_pwm_pin = { + init: function () { + this.setColour(PINS_HUE); + this.appendDummyInput("") + .appendField(new Blockly.FieldDropdown(Profile.default.pwm_pin), 'PIN'); + this.setOutput(true, Number); + } +}; + +export const pins_touch_pin = { + init: function () { + this.setColour(PINS_HUE); + this.appendDummyInput("") + .appendField(new Blockly.FieldDropdown(Profile.default.touch_pin), 'PIN'); + this.setOutput(true, Number); + } +}; + +export const pins_touch = { + init: function () { + this.setColour(PINS_HUE); + this.appendDummyInput("") + .appendField(new Blockly.FieldDropdown(Profile.default.touch), 'PIN'); + this.setOutput(true); + } +}; + +export const pins_serial = { + init: function () { + this.setColour(PINS_HUE); + this.appendDummyInput("") + .appendField(new Blockly.FieldDropdown(Profile.default.serial_pin), 'PIN'); + this.setOutput(true, Number); + } +}; + +export const pins_builtinimg = { + init: function () { + this.setColour(PINS_HUE); + this.appendDummyInput("") + .appendField(new Blockly.FieldDropdown(Profile.default.builtinimg), 'PIN'); + this.setOutput(true, "esp32_image"); + } +}; + +export const pins_builtinimg_extern = { + init: function () { + this.setColour(PINS_HUE); + this.appendDummyInput("") + .appendField(new Blockly.FieldDropdown(Profile.default.builtinimg_extern), 'PIN'); + this.setOutput(true, "esp32_image"); + } +}; + +export const pins_imglist = { + init: function () { + this.setColour(PINS_HUE); + this.appendDummyInput("") + .appendField(new Blockly.FieldDropdown(Profile.default.imglist), 'PIN'); + this.setOutput(true); + } +}; + +export const pins_playlist = { + init: function () { + this.setColour(PINS_HUE); + this.appendDummyInput("") + .appendField(new Blockly.FieldDropdown(Profile.default.playlist), 'PIN'); + this.setOutput(true); + } +}; + +export const pins_playlist_extern = { + init: function () { + this.setColour(PINS_HUE); + this.appendDummyInput("") + .appendField(new Blockly.FieldDropdown(Profile.default.playlist_extern), 'PIN'); + this.setOutput(true); + } +}; + +export const pins_exlcdh = { + init: function () { + this.setColour(PINS_HUE); + this.appendDummyInput("") + .appendField(new Blockly.FieldDropdown(Profile.default.exlcdh), 'PIN'); + this.setOutput(true, Number); + } +}; + +export const pins_exlcdv = { + init: function () { + this.setColour(PINS_HUE); + this.appendDummyInput("") + .appendField(new Blockly.FieldDropdown(Profile.default.exlcdv), 'PIN'); + this.setOutput(true, Number); + } +}; + + +export const pins_axis = { + init: function () { + this.setColour(PINS_HUE); + this.appendDummyInput("") + .appendField(new Blockly.FieldDropdown(Profile.default.axis), 'PIN'); + this.setOutput(true, Number); + } +}; +export const pins_brightness = { + init: function () { + this.setColour(PINS_HUE); + this.appendDummyInput("") + .appendField(new Blockly.FieldDropdown(Profile.default.brightness), 'PIN'); + this.setOutput(true, Number); + } +}; + +export const pins_tts_voice = { + init: function () { + this.setColour(PINS_HUE); + this.appendDummyInput("") + .appendField(new Blockly.FieldDropdown(Profile.default.tts_voice), 'PIN'); + this.setOutput(true, Number); + } +}; + +export const pins_tts_builtin_music = { + init: function () { + this.setColour(PINS_HUE); + this.appendDummyInput("") + .appendField(new Blockly.FieldDropdown(Profile.default.tts_builtin_music), 'PIN'); + this.setOutput(true, Number); + } +}; + +export const pins_tts_bgmusic = { + init: function () { + this.setColour(PINS_HUE); + this.appendDummyInput("") + .appendField(new Blockly.FieldDropdown(Profile.default.tts_bgmusic), 'PIN'); + this.setOutput(true, Number); + } +}; + +export const pins_tone_notes = { + init: function () { + this.setColour(PINS_HUE); + this.appendDummyInput("") + .appendField(new Blockly.FieldDropdown(Profile.default.tone_notes), 'PIN'); + this.setOutput(true, Number); + } +}; + +export const pins_radio_power = { + init: function () { + this.setColour(PINS_HUE); + this.appendDummyInput("") + .appendField(new Blockly.FieldDropdown(Profile.default.radio_power), 'PIN'); + this.setOutput(true, Number); + } +}; + +export const pins_radio_datarate = { + init: function () { + this.setColour(PINS_HUE); + this.appendDummyInput("") + .appendField(new Blockly.FieldDropdown(Profile.default.radio_datarate), 'PIN'); + this.setOutput(true, Number); + } +}; + +export const pins_one_more = { + init: function () { + this.setColour(PINS_HUE); + this.appendDummyInput("") + .appendField(new Blockly.FieldDropdown(Profile.default.one_more), 'PIN'); + this.setOutput(true); + } +}; + +export const pins_digital_dot = { + init: function () { + this.setColour(PINS_HUE); + this.appendDummyInput("") + .appendField(new Blockly.FieldDropdown(Profile.default.digital_dot), 'PIN'); + this.setOutput(true, Number); + } +}; + +export const timer_id_pin = { + init: function () { + this.setColour(PINS_HUE); + this.appendDummyInput("") + .appendField(new Blockly.FieldDropdown([ + ["0","0"], + ["1","1"], + ["2","2"], + ["3","3"] + ]), 'PIN'); + this.setOutput(true, Number); + } +}; \ No newline at end of file diff --git a/boards/default_src/micropython_esp32c5/css/color_esp32c5.css b/boards/default_src/micropython_esp32c5/css/color_esp32c5.css new file mode 100644 index 00000000..08b690b9 --- /dev/null +++ b/boards/default_src/micropython_esp32c5/css/color_esp32c5.css @@ -0,0 +1,489 @@ +div.blocklyToolboxDiv>div.blocklyToolboxContents>div:nth-child(1)>div.blocklyTreeRow>div.blocklyTreeRowContentContainer>span.blocklyTreeIcon { + background: url('../../../../common/media/mark/inout.png') no-repeat; + background-size: 100% auto; +} + +div.blocklyToolboxDiv>div.blocklyToolboxContents>div:nth-child(1)>div.blocklyTreeRow.blocklyTreeSelected>div.blocklyTreeRowContentContainer>span.blocklyTreeIcon { + background: url('../../../../common/media/mark/inout2.png') no-repeat; + background-size: 100% auto; +} + +div.blocklyToolboxDiv>div.blocklyToolboxContents>div:nth-child(2)>div.blocklyTreeRow>div.blocklyTreeRowContentContainer>span.blocklyTreeIcon { + background: url('../../../../common/media/mark/ctrl.png') no-repeat; + background-size: 100% auto; +} + +div.blocklyToolboxDiv>div.blocklyToolboxContents>div:nth-child(2)>div.blocklyTreeRow.blocklyTreeSelected>div.blocklyTreeRowContentContainer>span.blocklyTreeIcon { + background: url('../../../../common/media/mark/ctrl2.png') no-repeat; + background-size: 100% auto; +} + +div.blocklyToolboxDiv>div.blocklyToolboxContents>div:nth-child(3)>div.blocklyTreeRow>div.blocklyTreeRowContentContainer>span.blocklyTreeIcon { + background: url('../../../../common/media/mark/math.png') no-repeat; + background-size: 100% auto; +} + +div.blocklyToolboxDiv>div.blocklyToolboxContents>div:nth-child(3)>div.blocklyTreeRow.blocklyTreeSelected>div.blocklyTreeRowContentContainer>span.blocklyTreeIcon { + background: url('../../../../common/media/mark/math2.png') no-repeat; + background-size: 100% auto; +} + +div.blocklyToolboxDiv>div.blocklyToolboxContents>div:nth-child(4)>div.blocklyTreeRow>div.blocklyTreeRowContentContainer>span.blocklyTreeIcon { + background: url('../../../../common/media/mark/logic.png') no-repeat; + background-size: 100% auto; +} + +div.blocklyToolboxDiv>div.blocklyToolboxContents>div:nth-child(4)>div.blocklyTreeRow.blocklyTreeSelected>div.blocklyTreeRowContentContainer>span.blocklyTreeIcon { + background: url('../../../../common/media/mark/logic2.png') no-repeat; + background-size: 100% auto; +} + +div.blocklyToolboxDiv>div.blocklyToolboxContents>div:nth-child(5)>div.blocklyTreeRow>div.blocklyTreeRowContentContainer>span.blocklyTreeIcon { + background: url('../../../../common/media/mark/text.png') no-repeat; + background-size: 100% auto; +} + +div.blocklyToolboxDiv>div.blocklyToolboxContents>div:nth-child(5)>div.blocklyTreeRow.blocklyTreeSelected>div.blocklyTreeRowContentContainer>span.blocklyTreeIcon { + background: url('../../../../common/media/mark/text2.png') no-repeat; + background-size: 100% auto; +} + +div.blocklyToolboxDiv>div.blocklyToolboxContents>div:nth-child(6)>div.blocklyTreeRow>div.blocklyTreeRowContentContainer>span.blocklyTreeIcon { + background: url('../../../../common/media/mark/list3.png') no-repeat; + background-size: 100% auto; +} + +div.blocklyToolboxDiv>div.blocklyToolboxContents>div:nth-child(6)>div.blocklyTreeRow.blocklyTreeSelected>div.blocklyTreeRowContentContainer>span.blocklyTreeIcon { + background: url('../../../../common/media/mark/list4.png') no-repeat; + background-size: 100% auto; +} + +div.blocklyToolboxDiv>div.blocklyToolboxContents>div:nth-child(7)>div.blocklyTreeRow>div.blocklyTreeRowContentContainer>span.blocklyTreeIcon { + background: url('../../../../common/media/mark/tuple.png') no-repeat; + background-size: 100% auto; +} + +div.blocklyToolboxDiv>div.blocklyToolboxContents>div:nth-child(7)>div.blocklyTreeRow.blocklyTreeSelected>div.blocklyTreeRowContentContainer>span.blocklyTreeIcon { + background: url('../../../../common/media/mark/tuple2.png') no-repeat; + background-size: 100% auto; +} + +div.blocklyToolboxDiv>div.blocklyToolboxContents>div:nth-child(8)>div.blocklyTreeRow>div.blocklyTreeRowContentContainer>span.blocklyTreeIcon { + background: url('../../../../common/media/mark/dict.png') no-repeat; + background-size: 100% auto; +} + +div.blocklyToolboxDiv>div.blocklyToolboxContents>div:nth-child(8)>div.blocklyTreeRow.blocklyTreeSelected>div.blocklyTreeRowContentContainer>span.blocklyTreeIcon { + background: url('../../../../common/media/mark/dict2.png') no-repeat; + background-size: 100% auto; +} + +div.blocklyToolboxDiv>div.blocklyToolboxContents>div:nth-child(9)>div.blocklyTreeRow>div.blocklyTreeRowContentContainer>span.blocklyTreeIcon { + background: url('../../../../common/media/mark/set.png') no-repeat; + background-size: 100% auto; +} + +div.blocklyToolboxDiv>div.blocklyToolboxContents>div:nth-child(9)>div.blocklyTreeRow.blocklyTreeSelected>div.blocklyTreeRowContentContainer>span.blocklyTreeIcon { + background: url('../../../../common/media/mark/set2.png') no-repeat; + background-size: 100% auto; +} + +div.blocklyToolboxDiv>div.blocklyToolboxContents>div:nth-child(10)>div.blocklyTreeRow>div.blocklyTreeRowContentContainer>span.blocklyTreeIcon { + background: url('../../../../common/media/mark/var.png') no-repeat; + background-size: 100% auto; +} + +div.blocklyToolboxDiv>div.blocklyToolboxContents>div:nth-child(10)>div.blocklyTreeRow.blocklyTreeSelected>div.blocklyTreeRowContentContainer>span.blocklyTreeIcon { + background: url('../../../../common/media/mark/var2.png') no-repeat; + background-size: 100% auto; +} + +div.blocklyToolboxDiv>div.blocklyToolboxContents>div:nth-child(11)>div.blocklyTreeRow>div.blocklyTreeRowContentContainer>span.blocklyTreeIcon { + background: url('../../../../common/media/mark/func.png') no-repeat; + background-size: 100% auto; +} + +div.blocklyToolboxDiv>div.blocklyToolboxContents>div:nth-child(11)>div.blocklyTreeRow.blocklyTreeSelected>div.blocklyTreeRowContentContainer>span.blocklyTreeIcon { + background: url('../../../../common/media/mark/func2.png') no-repeat; + background-size: 100% auto; +} + +div.blocklyToolboxDiv>div.blocklyToolboxContents>div:nth-child(12)>div.blocklyTreeRow>div.blocklyTreeRowContentContainer>span.blocklyTreeIcon { + background: url('../../../../common/media/mark/port.png') no-repeat; + background-size: 100% auto; +} + +div.blocklyToolboxDiv>div.blocklyToolboxContents>div:nth-child(12)>div.blocklyTreeRow.blocklyTreeSelected>div.blocklyTreeRowContentContainer>span.blocklyTreeIcon { + background: url('../../../../common/media/mark/port2.png') no-repeat; + background-size: 100% auto; +} + +#catOnBoardSensor.blocklyTreeRow>div.blocklyTreeRowContentContainer>span.blocklyTreeIcon { + background: url('../../../../common/media/mark/sensor_onboard.png') no-repeat; + background-size: 100% auto; +} + +#catOnBoardSensor.blocklyTreeRow.blocklyTreeSelected>div.blocklyTreeRowContentContainer>span.blocklyTreeIcon { + background: url('../../../../common/media/mark/sensor_new2.png') no-repeat; + background-size: 100% auto; +} + +#catOnBoardActuator.blocklyTreeRow>div.blocklyTreeRowContentContainer>span.blocklyTreeIcon { + background: url('../../../../common/media/mark/actuator_onboard.png') no-repeat; + background-size: 100% auto; +} + +#catOnBoardActuator.blocklyTreeRow.blocklyTreeSelected>div.blocklyTreeRowContentContainer>span.blocklyTreeIcon { + background: url('../../../../common/media/mark/actuator_new2.png') no-repeat; + background-size: 100% auto; +} + +#catOnBoardDisplay.blocklyTreeRow>div.blocklyTreeRowContentContainer>span.blocklyTreeIcon { + background: url('../../../../common/media/mark/display_onboard.png') no-repeat; + background-size: 100% auto; +} + +#catOnBoardDisplay.blocklyTreeRow.blocklyTreeSelected>div.blocklyTreeRowContentContainer>span.blocklyTreeIcon { + background: url('../../../../common/media/mark/display_new2.png') no-repeat; + background-size: 100% auto; +} + +#catSANT_G3.blocklyTreeRow>div.blocklyTreeRowContentContainer>span.blocklyTreeIcon { + background: url('../../../../common/media/mark/sensor.png') no-repeat; + background-size: 100% auto; +} + +#catSANT_G3.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 { + background: url('../../../../common/media/mark/sensor_extern.png') no-repeat; + background-size: 100% auto; +} + +#catExternSensor.blocklyTreeRow.blocklyTreeSelected>div.blocklyTreeRowContentContainer>span.blocklyTreeIcon { + background: url('../../../../common/media/mark/sensor_new2.png') no-repeat; + background-size: 100% auto; +} + +#catExternActuator.blocklyTreeRow>div.blocklyTreeRowContentContainer>span.blocklyTreeIcon { + background: url('../../../../common/media/mark/actuator_extern.png') no-repeat; + background-size: 100% auto; +} + +#catExternActuator.blocklyTreeRow.blocklyTreeSelected>div.blocklyTreeRowContentContainer>span.blocklyTreeIcon { + background: url('../../../../common/media/mark/actuator_new2.png') no-repeat; + background-size: 100% auto; +} + +#catMatrix.blocklyTreeRow>div.blocklyTreeRowContentContainer>span.blocklyTreeIcon { + background: url('../../../../common/media/mark/Matrix.png') no-repeat; + background-size: 100% auto; +} + +#catMatrix.blocklyTreeRow.blocklyTreeSelected>div.blocklyTreeRowContentContainer>span.blocklyTreeIcon { + background: url('../../../../common/media/mark/Matrix2.png') no-repeat; + background-size: 100% auto; +} + +#catOLED.blocklyTreeRow>div.blocklyTreeRowContentContainer>span.blocklyTreeIcon { + background: url('../../../../common/media/mark/oled.png') no-repeat; + background-size: 100% auto; +} + +#catOLED.blocklyTreeRow.blocklyTreeSelected>div.blocklyTreeRowContentContainer>span.blocklyTreeIcon { + background: url('../../../../common/media/mark/oled2.png') no-repeat; + background-size: 100% auto; +} + +#catTFT.blocklyTreeRow>div.blocklyTreeRowContentContainer>span.blocklyTreeIcon { + background: url('../../../../common/media/mark/oled.png') no-repeat; + background-size: 100% auto; +} + +#catTFT.blocklyTreeRow.blocklyTreeSelected>div.blocklyTreeRowContentContainer>span.blocklyTreeIcon { + background: url('../../../../common/media/mark/oled2.png') no-repeat; + background-size: 100% auto; +} + +#catLCD.blocklyTreeRow>div.blocklyTreeRowContentContainer>span.blocklyTreeIcon { + background: url('../../../../common/media/mark/oled.png') no-repeat; + background-size: 100% auto; +} + +#catLCD.blocklyTreeRow.blocklyTreeSelected>div.blocklyTreeRowContentContainer>span.blocklyTreeIcon { + background: url('../../../../common/media/mark/oled2.png') no-repeat; + background-size: 100% auto; +} + +#cat4Digitdisplay.blocklyTreeRow>div.blocklyTreeRowContentContainer>span.blocklyTreeIcon { + background: url('../../../../common/media/mark/4Digitdisplay.png') no-repeat; + background-size: 100% auto; +} + +#cat4Digitdisplay.blocklyTreeRow.blocklyTreeSelected>div.blocklyTreeRowContentContainer>span.blocklyTreeIcon { + background: url('../../../../common/media/mark/4Digitdisplay2.png') no-repeat; + background-size: 100% auto; +} + +#catAIsensor.blocklyTreeRow>div.blocklyTreeRowContentContainer>span.blocklyTreeIcon { + background: url('../../../../common/media/mark/image.png') no-repeat; + background-size: 100% auto; +} + +#catAIsensor.blocklyTreeRow.blocklyTreeSelected>div.blocklyTreeRowContentContainer>span.blocklyTreeIcon { + background: url('../../../../common/media/mark/image2.png') no-repeat; + background-size: 100% auto; +} + +#catAIsensor2.blocklyTreeRow>div.blocklyTreeRowContentContainer>span.blocklyTreeIcon { + background: url('../../../../common/media/mark/image.png') no-repeat; + background-size: 100% auto; +} + +#catAIsensor2.blocklyTreeRow.blocklyTreeSelected>div.blocklyTreeRowContentContainer>span.blocklyTreeIcon { + background: url('../../../../common/media/mark/image2.png') no-repeat; + background-size: 100% auto; +} + +#catFile.blocklyTreeRow>div.blocklyTreeRowContentContainer>span.blocklyTreeIcon { + background: url('../../../../common/media/mark/file.png') no-repeat; + background-size: 100% auto; +} + +#catFile.blocklyTreeRow.blocklyTreeSelected>div.blocklyTreeRowContentContainer>span.blocklyTreeIcon { + background: url('../../../../common/media/mark/file2.png') no-repeat; + background-size: 100% auto; +} + +#catBLE.blocklyTreeRow>div.blocklyTreeRowContentContainer>span.blocklyTreeIcon { + background: url('../../../../common/media/mark/comuni.png') no-repeat; + background-size: 100% auto; +} + +#catBLE.blocklyTreeRow.blocklyTreeSelected>div.blocklyTreeRowContentContainer>span.blocklyTreeIcon { + background: url('../../../../common/media/mark/comuni2.png') no-repeat; + background-size: 100% auto; +} + +#catIR.blocklyTreeRow>div.blocklyTreeRowContentContainer>span.blocklyTreeIcon { + background: url('../../../../common/media/mark/comuni.png') no-repeat; + background-size: 100% auto; +} + +#catIR.blocklyTreeRow.blocklyTreeSelected>div.blocklyTreeRowContentContainer>span.blocklyTreeIcon { + background: url('../../../../common/media/mark/comuni2.png') no-repeat; + background-size: 100% auto; +} + +#catI2C.blocklyTreeRow>div.blocklyTreeRowContentContainer>span.blocklyTreeIcon { + background: url('../../../../common/media/mark/comuni.png') no-repeat; + background-size: 100% auto; +} + +#catI2C.blocklyTreeRow.blocklyTreeSelected>div.blocklyTreeRowContentContainer>span.blocklyTreeIcon { + background: url('../../../../common/media/mark/comuni2.png') no-repeat; + background-size: 100% auto; +} + +#catSPI.blocklyTreeRow>div.blocklyTreeRowContentContainer>span.blocklyTreeIcon { + background: url('../../../../common/media/mark/comuni.png') no-repeat; + background-size: 100% auto; +} + +#catSPI.blocklyTreeRow.blocklyTreeSelected>div.blocklyTreeRowContentContainer>span.blocklyTreeIcon { + background: url('../../../../common/media/mark/comuni2.png') no-repeat; + background-size: 100% auto; +} + +#catRadio.blocklyTreeRow>div.blocklyTreeRowContentContainer>span.blocklyTreeIcon { + background: url('../../../../common/media/mark/comuni.png') no-repeat; + background-size: 100% auto; +} + +#catRadio.blocklyTreeRow.blocklyTreeSelected>div.blocklyTreeRowContentContainer>span.blocklyTreeIcon { + background: url('../../../../common/media/mark/comuni2.png') no-repeat; + background-size: 100% auto; +} + +#catOneWire.blocklyTreeRow>div.blocklyTreeRowContentContainer>span.blocklyTreeIcon { + background: url('../../../../common/media/mark/comuni.png') no-repeat; + background-size: 100% auto; +} + +#catOneWire.blocklyTreeRow.blocklyTreeSelected>div.blocklyTreeRowContentContainer>span.blocklyTreeIcon { + background: url('../../../../common/media/mark/comuni2.png') no-repeat; + background-size: 100% auto; +} + +#catESPNow.blocklyTreeRow>div.blocklyTreeRowContentContainer>span.blocklyTreeIcon { + background: url('../../../../common/media/mark/comuni.png') no-repeat; + background-size: 100% auto; +} + +#catESPNow.blocklyTreeRow.blocklyTreeSelected>div.blocklyTreeRowContentContainer>span.blocklyTreeIcon { + background: url('../../../../common/media/mark/comuni2.png') no-repeat; + background-size: 100% auto; +} + +#catLora.blocklyTreeRow>div.blocklyTreeRowContentContainer>span.blocklyTreeIcon { + background: url('../../../../common/media/mark/comuni.png') no-repeat; + background-size: 100% auto; +} + +#catLora.blocklyTreeRow.blocklyTreeSelected>div.blocklyTreeRowContentContainer>span.blocklyTreeIcon { + background: url('../../../../common/media/mark/comuni2.png') no-repeat; + background-size: 100% auto; +} + +#catNetwork.blocklyTreeRow>div.blocklyTreeRowContentContainer>span.blocklyTreeIcon { + background: url('../../../../common/media/mark/net3.png') no-repeat; + background-size: 100% auto; +} + +#catNetwork.blocklyTreeRow.blocklyTreeSelected>div.blocklyTreeRowContentContainer>span.blocklyTreeIcon { + background: url('../../../../common/media/mark/net2.png') no-repeat; + background-size: 100% auto; +} + +#catOnenet.blocklyTreeRow>div.blocklyTreeRowContentContainer>span.blocklyTreeIcon { + background: url('../../../../common/media/mark/onenet.png') no-repeat; + background-size: 100% auto; +} + +#catOnenet.blocklyTreeRow.blocklyTreeSelected>div.blocklyTreeRowContentContainer>span.blocklyTreeIcon { + background: url('../../../../common/media/mark/onenet2.png') no-repeat; + background-size: 100% auto; +} + +#catBlynk.blocklyTreeRow>div.blocklyTreeRowContentContainer>span.blocklyTreeIcon { + background: url('../../../../common/media/mark/blynk.png') no-repeat; + background-size: 100% auto; +} + +#catBlynk.blocklyTreeRow.blocklyTreeSelected>div.blocklyTreeRowContentContainer>span.blocklyTreeIcon { + background: url('../../../../common/media/mark/blynk2.png') no-repeat; + background-size: 100% auto; +} + +#catMixIO.blocklyTreeRow>div.blocklyTreeRowContentContainer>span.blocklyTreeIcon { + background: url('../../../../common/media/mark/mixio.png') no-repeat; + background-size: 100% auto; +} + +#catMixIO.blocklyTreeRow.blocklyTreeSelected>div.blocklyTreeRowContentContainer>span.blocklyTreeIcon { + background: url('../../../../common/media/mark/mixio2.png') no-repeat; + background-size: 100% auto; +} + +#catweather.blocklyTreeRow>div.blocklyTreeRowContentContainer>span.blocklyTreeIcon { + background: url('../../../../common/media/mark/weather.png') no-repeat; + background-size: 100% auto; +} + +#catweather.blocklyTreeRow.blocklyTreeSelected>div.blocklyTreeRowContentContainer>span.blocklyTreeIcon { + background: url('../../../../common/media/mark/weather2.png') no-repeat; + background-size: 100% auto; +} + +#catTinyWebDB.blocklyTreeRow>div.blocklyTreeRowContentContainer>span.blocklyTreeIcon { + background: url('../../../../common/media/mark/database.png') no-repeat; + background-size: 100% auto; +} + +#catTinyWebDB.blocklyTreeRow.blocklyTreeSelected>div.blocklyTreeRowContentContainer>span.blocklyTreeIcon { + background: url('../../../../common/media/mark/database2.png') no-repeat; + background-size: 100% auto; +} + +#catAIOT.blocklyTreeRow>div.blocklyTreeRowContentContainer>span.blocklyTreeIcon { + background: url('../../../../common/media/mark/ai.png') no-repeat; + background-size: 100% auto; +} + +#catAIOT.blocklyTreeRow.blocklyTreeSelected>div.blocklyTreeRowContentContainer>span.blocklyTreeIcon { + background: url('../../../../common/media/mark/ai2.png') no-repeat; + background-size: 100% auto; +} + +#catFactory.blocklyTreeRow>div.blocklyTreeRowContentContainer>span.blocklyTreeIcon { + background: url('../../../../common/media/mark/factory3.png') no-repeat; + background-size: 100% auto; +} + +#catFactory.blocklyTreeRow.blocklyTreeSelected>div.blocklyTreeRowContentContainer>span.blocklyTreeIcon { + background: url('../../../../common/media/mark/factory4.png') no-repeat; + background-size: 100% auto; +} + +#catNova_G1.blocklyTreeRow>div.blocklyTreeRowContentContainer>span.blocklyTreeIcon { + background: url('../../../../common/media/mark/act.png') no-repeat; + background-size: 100% auto; +} + +#catNova_G1.blocklyTreeRow.blocklyTreeSelected>div.blocklyTreeRowContentContainer>span.blocklyTreeIcon { + background: url('../../../../common/media/mark/act2.png') no-repeat; + background-size: 100% auto; +} + +#catCommunicate.blocklyTreeRow>div.blocklyTreeRowContentContainer>span.blocklyTreeIcon { + background: url('../../../../common/media/mark/requests.png') no-repeat; + background-size: 100% auto; +} + +#catCommunicate.blocklyTreeRow.blocklyTreeSelected>div.blocklyTreeRowContentContainer>span.blocklyTreeIcon { + background: url('../../../../common/media/mark/requests2.png') no-repeat; + background-size: 100% auto; +} + +#catBLEC.blocklyTreeRow>div.blocklyTreeRowContentContainer>span.blocklyTreeIcon { + background: url('../../../../common/media/mark/comuni.png') no-repeat; + background-size: 100% auto; +} + +#catBLEC.blocklyTreeRow.blocklyTreeSelected>div.blocklyTreeRowContentContainer>span.blocklyTreeIcon { + background: url('../../../../common/media/mark/comuni2.png') no-repeat; + background-size: 100% auto; +} + +#catBLEKM.blocklyTreeRow>div.blocklyTreeRowContentContainer>span.blocklyTreeIcon { + background: url('../../../../common/media/mark/comuni.png') no-repeat; + background-size: 100% auto; +} + +#catBLEKM.blocklyTreeRow.blocklyTreeSelected>div.blocklyTreeRowContentContainer>span.blocklyTreeIcon { + background: url('../../../../common/media/mark/comuni2.png') no-repeat; + background-size: 100% auto; +} + +#catAIgraphsensor.blocklyTreeRow>div.blocklyTreeRowContentContainer>span.blocklyTreeIcon { + background: url('../../../../common/media/mark/image.png') no-repeat; + background-size: 100% auto; +} + +#catAIgraphsensor.blocklyTreeRow.blocklyTreeSelected>div.blocklyTreeRowContentContainer>span.blocklyTreeIcon { + background: url('../../../../common/media/mark/image2.png') no-repeat; + background-size: 100% auto; +} + +#catAIvoicesensor.blocklyTreeRow>div.blocklyTreeRowContentContainer>span.blocklyTreeIcon { + background: url('../../../../common/media/mark/AIvoice.png') no-repeat; + background-size: 100% auto; +} + +#catAIvoicesensor.blocklyTreeRow.blocklyTreeSelected>div.blocklyTreeRowContentContainer>span.blocklyTreeIcon { + background: url('../../../../common/media/mark/AIvoice2.png') no-repeat; + background-size: 100% auto; +} + +#catAIgraphsensorpro.blocklyTreeRow>div.blocklyTreeRowContentContainer>span.blocklyTreeIcon { + background: url('../../../../common/media/mark/image.png') no-repeat; + background-size: 100% auto; +} + +#catAIgraphsensorpro.blocklyTreeRow.blocklyTreeSelected>div.blocklyTreeRowContentContainer>span.blocklyTreeIcon { + background: url('../../../../common/media/mark/image2.png') no-repeat; + background-size: 100% auto; +} \ No newline at end of file diff --git a/boards/default_src/micropython_esp32c5/export.js b/boards/default_src/micropython_esp32c5/export.js new file mode 100644 index 00000000..06e27320 --- /dev/null +++ b/boards/default_src/micropython_esp32c5/export.js @@ -0,0 +1,13 @@ +import MicropythonESP32C5Pins from './blocks/esp32_profile'; +import * as MicropythonESP32C5InoutBlocks from './blocks/inout'; +import * as MicropythonESP32C5PinsBlocks from './blocks/pins'; +import * as MicropythonESP32C5InoutGenerators from './generators/inout'; +import * as MicropythonESP32C5PinsGenerators from './generators/pins'; + +export { + MicropythonESP32C5Pins, + MicropythonESP32C5InoutBlocks, + MicropythonESP32C5PinsBlocks, + MicropythonESP32C5InoutGenerators, + MicropythonESP32C5PinsGenerators +}; \ No newline at end of file diff --git a/boards/default_src/micropython_esp32c5/generators/inout.js b/boards/default_src/micropython_esp32c5/generators/inout.js new file mode 100644 index 00000000..e6dcb9ee --- /dev/null +++ b/boards/default_src/micropython_esp32c5/generators/inout.js @@ -0,0 +1,109 @@ +import * as Blockly from 'blockly/core'; + +// ok +export const inout_highlow = function (_, generator) { + // Boolean values HIGH and LOW. + var code = (this.getFieldValue('BOOL') == 'HIGH') ? '1' : '0'; + return [code, generator.ORDER_ATOMIC]; +} + +// ok +export const inout_digital_write = function (_, generator) { + generator.definitions_['import_machine'] = 'import machine'; + var dropdown_pin = generator.valueToCode(this, 'PIN', generator.ORDER_ATOMIC); + var dropdown_stat = generator.valueToCode(this, 'STAT', generator.ORDER_ATOMIC); + var code = ""; + code += dropdown_pin + '.value(' + dropdown_stat + ')\n' + return code; +} + +// ok +export const inout_digital_read = function (_, generator) { + generator.definitions_['import_machine'] = 'import machine'; + var dropdown_pin = generator.valueToCode(this, 'PIN', generator.ORDER_ATOMIC); + var code = ""; + code = dropdown_pin + '.value()'; + return [code, generator.ORDER_ATOMIC]; +} + +// ok +export const inout_analog_write = function (_, generator) { + generator.definitions_['import_machine'] = 'import machine'; + var dropdown_pin = generator.valueToCode(this, 'PIN', generator.ORDER_ATOMIC); + //var dropdown_stat = this.getFieldValue('STAT'); + var value_num = generator.valueToCode(this, 'NUM', generator.ORDER_ATOMIC); + //generator.setups_['setup_output'+dropdown_pin] = 'pinMode('+dropdown_pin+', OUTPUT);'; + var code = dropdown_pin + '.write(' + value_num + ')\n'; + return code; +} + +// ok +export const inout_analog_write_set = function (_, generator) { + generator.definitions_['import_machine'] = 'import machine'; + var dropdown_pin = generator.valueToCode(this, 'PIN', generator.ORDER_ATOMIC); + var value_num = generator.valueToCode(this, 'NUM', generator.ORDER_ATOMIC); + var key = this.getFieldValue('key'); + var code = dropdown_pin + '.set_analog_' + key + '(' + value_num + ')\n'; + //var code = 'pin' + dropdown_pin + '.set_analog_period(' + value_num + ')\n'; + return code; +} + +// ok +export const inout_pin_pressed = function (_, generator) { + generator.definitions_['import_machine'] = 'import machine'; + var pin = generator.valueToCode(this, 'pin', generator.ORDER_ATOMIC); + var code = pin + '.read()'; + return [code, generator.ORDER_ATOMIC]; +} + +export const inout_pin_attachInterrupt = function (_, generator) { + generator.definitions_['import_machine'] = 'import machine'; + var dropdown_pin = generator.valueToCode(this, 'PIN', generator.ORDER_ATOMIC); + var dropdown_mode = this.getFieldValue('mode'); + var atta = generator.valueToCode(this, 'DO', generator.ORDER_ATOMIC); + var code = 'machine.Pin(' + dropdown_pin + ').irq' + '(handler = ' + atta + ', trigger = ' + dropdown_mode + ')\n' + //var funcName = 'attachInterrupt_func_' + dropdown_pin; + //var branch = generator.statementToCode(this, 'DO') || generator.PASS; + //var code2 = 'def' + ' ' + funcName + '(p):\n' + branch + '\n'; + //generator.setups_[funcName] = code2; + return code; +} + +export const inout_digital_init = function (_, generator) { + generator.definitions_['import_machine'] = 'import machine'; + var pin_obj = this.getFieldValue('PIN_OBJ') || 'pin#'; + var dropdown_pin = generator.valueToCode(this, 'PIN', generator.ORDER_ATOMIC); + var dropdown_mode = this.getFieldValue('MODE'); + var varName = (pin_obj == 'pin#') ? 'pin' + dropdown_pin : generator.variableDB_.getName(pin_obj, Blockly.Variables.NAME_TYPE); + var code = varName + ' = machine.Pin(' + dropdown_pin + ', ' + dropdown_mode + ')\n'; + return code; +} + +// ok +export const inout_analog_write_init = function (_, generator) { + generator.definitions_['import_machine'] = 'import machine'; + var pin_obj = this.getFieldValue('PIN_OBJ') || 'dac#'; + var dropdown_pin = generator.valueToCode(this, 'PIN', generator.ORDER_ATOMIC); + var varName = (pin_obj == 'dac#') ? 'dac' + dropdown_pin : generator.variableDB_.getName(pin_obj, Blockly.Variables.NAME_TYPE); + var code = varName + ' = machine.DAC(machine.Pin(' + dropdown_pin + '))\n'; + return code; +} + +export const inout_analog_atten = function (_, generator) { + generator.definitions_['import_machine'] = 'import machine'; + var dropdown_pin = generator.valueToCode(this, 'PIN', generator.ORDER_ATOMIC); + //var dropdown_stat = this.getFieldValue('STAT'); + var value_atten = this.getFieldValue('atten') + var code = dropdown_pin + '.atten(' + value_atten + ')\n'; + return code; +} + +// ok +export const inout_pin_pressed_init = function (_, generator) { + generator.definitions_['import_machine'] = 'import machine'; + var pin_obj = this.getFieldValue('PIN_OBJ') || 'tc#'; + var dropdown_pin = generator.valueToCode(this, 'PIN', generator.ORDER_ATOMIC); + var varName = (pin_obj == 'tc#') ? 'tc' + dropdown_pin : generator.variableDB_.getName(pin_obj, Blockly.Variables.NAME_TYPE); + var code = varName + ' = machine.TouchPad(machine.Pin(' + dropdown_pin + '))\n'; + return code; +} \ No newline at end of file diff --git a/boards/default_src/micropython_esp32c5/generators/pins.js b/boards/default_src/micropython_esp32c5/generators/pins.js new file mode 100644 index 00000000..3fd1b85c --- /dev/null +++ b/boards/default_src/micropython_esp32c5/generators/pins.js @@ -0,0 +1,59 @@ +export const pins_digital = function (_, generator) { + const code = this.getFieldValue('PIN'); + return [code, generator.ORDER_ATOMIC]; +}; + +export const pins_button = pins_digital; +export const pins_buttonB = pins_digital; +export const pins_digital_pin = pins_digital; +export const pins_input_pin = pins_digital; +export const pins_output_pin = pins_digital; +export const pins_pwm_input = pins_digital; +export const espnow_channel = pins_digital; +export const haskylens_model = pins_digital; +export const analog_input = pins_digital; +export const pwm_output = pins_digital; +export const analog_output = pins_digital; +export const i2c_A_pin = pins_digital; +export const i2c_B_pin = pins_digital; +export const spi_A_pin = pins_digital; +export const spi_B_pin = pins_digital; +export const spi_C_pin = pins_digital; +export const spi_D_pin = pins_digital; +export const pins_analog_pin = pins_digital; +export const pins_analog = pins_digital; +export const pins_pwm_pin = pins_digital; +export const pins_pwm = pins_digital; +export const pins_dac_pin = pins_digital; +export const pins_dac = pins_digital; +export const pins_touch_pin = pins_digital; +export const pins_touch = pins_digital; +export const pins_interrupt = pins_digital; +export const pins_serial = pins_digital; +export const pins_builtinimg_extern = pins_digital; +export const pins_imglist = pins_digital; +export const pins_playlist = pins_digital; +export const pins_playlist_extern = pins_digital; +export const pins_axis = pins_digital; +export const pins_exlcdh = pins_digital; +export const pins_exlcdv = pins_digital; +export const pins_brightness = pins_digital; +export const pins_tts_voice = pins_digital; +export const pins_tts_builtin_music = pins_digital; +export const pins_tts_bgmusic = pins_digital; +export const pins_tone_notes = pins_digital; +export const pins_radio_power = pins_digital; +export const pins_radio_datarate = pins_digital; +export const pins_one_more = pins_digital; +export const pins_digital_dot = pins_digital; +export const timer_id_pin = pins_digital; + +export const pins_builtinimg = function (_, generator) { + const PIN_VALUE = this.getFieldValue('PIN'); + const data = PIN_VALUE.split('.'); + if (data.length !== 2) { + throw Error('pin value error'); + } + generator.definitions_[`import_${data[0]}_${data[1]}`] = `from ${data[0]} import ${data[1]}`; + return [data[1], generator.ORDER_ATOMIC]; +}; \ No newline at end of file diff --git a/boards/default_src/micropython_esp32c5/index.js b/boards/default_src/micropython_esp32c5/index.js new file mode 100644 index 00000000..563a8a93 --- /dev/null +++ b/boards/default_src/micropython_esp32c5/index.js @@ -0,0 +1,182 @@ +import * as Blockly from 'blockly/core'; +import { Profile } from 'mixly'; + +import { + PythonVariablesBlocks, + PythonControlBlocks, + PythonMathBlocks, + PythonTextBlocks, + PythonListsBlocks, + PythonDictsBlocks, + PythonLogicBlocks, + PythonStorageBlocks, + PythonProceduresBlocks, + PythonTupleBlocks, + PythonSetBlocks, + PythonHtmlBlocks, + PythonUtilityBlocks, + PythonVariablesGenerators, + PythonControlGenerators, + PythonMathGenerators, + PythonTextGenerators, + PythonListsGenerators, + PythonDictsGenerators, + PythonLogicGenerators, + PythonStorageGenerators, + PythonProceduresGenerators, + PythonTupleGenerators, + PythonSetGenerators, + PythonHtmlGenerators, + PythonUtilityGenerators, + Procedures, + Variables, + Python +} from '@mixly/python'; + +import { + MicroPythonActuatorExternBlocks, + MicroPythonActuatorOnBoardBlocks, + MicroPythonAISensorBlocks, + MicroPythonAIBlocks, + MicroPythonAILocalBlocks, + MicroPythonBlynkBlocks, + MicroPythonCommunicateBlocks, + MicroPythonDisplayExternBlocks, + MicroPythonDisplayOnBoardBlocks, + MicroPythonFactoryBlocks, + MicroPythonInputBlocks, + MicroPythonIotBlocks, + MicroPythonNetworkBlocks, + MicroPythonNovaG1Blocks, + MicroPythonPeG1Blocks, + MicroPythonSensorExternBlocks, + MicroPythonSensorOnBoardBlocks, + MicroPythonSerialBlocks, + MicroPythonSystemBlocks, + MicroPythonWeatherBlocks, + MicroPythonActuatorExternGenerators, + MicroPythonActuatorOnBoardGenerators, + MicroPythonAISensorGenerators, + MicroPythonAIGenerators, + MicroPythonAILocalGenerators, + MicroPythonBlynkGenerators, + MicroPythonCommunicateGenerators, + MicroPythonDisplayExternGenerators, + MicroPythonDisplayOnBoardGenerators, + MicroPythonFactoryGenerators, + MicroPythonInputGenerators, + MicroPythonIotGenerators, + MicroPythonNetworkGenerators, + MicroPythonNovaG1Generators, + MicroPythonPeG1Generators, + MicroPythonSensorExternGenerators, + MicroPythonSensorOnBoardGenerators, + MicroPythonSerialGenerators, + MicroPythonSystemGenerators, + MicroPythonWeatherGenerators, + MicroPythonZhHans, + MicroPythonZhHant, + MicroPythonEn +} from '@mixly/micropython'; + +import { + MicropythonESP32C5Pins, + MicropythonESP32C5InoutBlocks, + MicropythonESP32C5PinsBlocks, + MicropythonESP32C5InoutGenerators, + MicropythonESP32C5PinsGenerators +} from './'; + +import './css/color_esp32c5.css'; + +Object.assign(Blockly.Variables, Variables); +Object.assign(Blockly.Procedures, Procedures); + +Object.assign(Blockly.Lang.ZhHans, MicroPythonZhHans); +Object.assign(Blockly.Lang.ZhHant, MicroPythonZhHant); +Object.assign(Blockly.Lang.En, MicroPythonEn); + +Blockly.Python = Python; +Blockly.generator = Python; + +Profile.default = {}; +Object.assign(Profile, MicropythonESP32C5Pins); +Object.assign(Profile.default, MicropythonESP32C5Pins['元控青春']); + +Object.assign( + Blockly.Blocks, + PythonVariablesBlocks, + PythonControlBlocks, + PythonMathBlocks, + PythonTextBlocks, + PythonListsBlocks, + PythonDictsBlocks, + PythonLogicBlocks, + PythonStorageBlocks, + PythonProceduresBlocks, + PythonTupleBlocks, + PythonSetBlocks, + PythonHtmlBlocks, + PythonUtilityBlocks, + MicroPythonInputBlocks, + MicroPythonSystemBlocks, + MicroPythonSerialBlocks, + MicroPythonCommunicateBlocks, + MicroPythonIotBlocks, + MicroPythonWeatherBlocks, + MicroPythonAISensorBlocks, + MicroPythonAILocalBlocks, + MicroPythonSensorOnBoardBlocks, + MicroPythonSensorExternBlocks, + MicroPythonPeG1Blocks, + MicroPythonNetworkBlocks, + MicroPythonAIBlocks, + MicroPythonActuatorOnBoardBlocks, + MicroPythonActuatorExternBlocks, + MicroPythonDisplayOnBoardBlocks, + MicroPythonDisplayExternBlocks, + MicroPythonFactoryBlocks, + MicroPythonBlynkBlocks, + MicroPythonNovaG1Blocks, + MicropythonESP32C5InoutBlocks, + MicropythonESP32C5PinsBlocks +); + +Object.assign( + Blockly.Python.forBlock, + PythonVariablesGenerators, + PythonControlGenerators, + PythonMathGenerators, + PythonTextGenerators, + PythonListsGenerators, + PythonDictsGenerators, + PythonLogicGenerators, + PythonStorageGenerators, + PythonProceduresGenerators, + PythonTupleGenerators, + PythonSetGenerators, + PythonHtmlGenerators, + PythonUtilityGenerators, + MicroPythonInputGenerators, + MicroPythonSystemGenerators, + MicroPythonSerialGenerators, + MicroPythonCommunicateGenerators, + MicroPythonIotGenerators, + MicroPythonWeatherGenerators, + MicroPythonAISensorGenerators, + MicroPythonAILocalGenerators, + MicroPythonSensorOnBoardGenerators, + MicroPythonSensorExternGenerators, + MicroPythonPeG1Generators, + MicroPythonNetworkGenerators, + MicroPythonAIGenerators, + MicroPythonActuatorOnBoardGenerators, + MicroPythonActuatorExternGenerators, + MicroPythonDisplayOnBoardGenerators, + MicroPythonDisplayExternGenerators, + MicroPythonFactoryGenerators, + MicroPythonBlynkGenerators, + MicroPythonNovaG1Generators, + MicropythonESP32C5InoutGenerators, + MicropythonESP32C5PinsGenerators +); \ No newline at end of file diff --git a/boards/default_src/micropython_esp32c5/jsconfig.json b/boards/default_src/micropython_esp32c5/jsconfig.json new file mode 100644 index 00000000..1e4522a1 --- /dev/null +++ b/boards/default_src/micropython_esp32c5/jsconfig.json @@ -0,0 +1,18 @@ +{ + "compilerOptions": { + "experimentalDecorators": true, + "baseUrl": "./", + "paths": { + "@mixly/python": [ + "../python" + ], + "@mixly/micropython": [ + "../micropython" + ] + } + }, + "exclude": [ + "node_modules", + "dist" + ] +} \ No newline at end of file diff --git a/boards/default_src/micropython_esp32c5/origin/config.json b/boards/default_src/micropython_esp32c5/origin/config.json new file mode 100644 index 00000000..f50a21fd --- /dev/null +++ b/boards/default_src/micropython_esp32c5/origin/config.json @@ -0,0 +1,146 @@ +{ + "board": { + "元控自立": { + "key": "micropython:esp32c5:mixgo_sowl", + "config": [ + { + "key": "BurnSpeed", + "label": "Burn Speed", + "messageId": "MICROPYTHON_CONFIG_MESSAGE_BURN_SPEED", + "options": [ + { + "key": "921600", + "label": "921600" + }, + { + "key": "460800", + "label": "460800" + }, + { + "key": "230400", + "label": "230400" + }, + { + "key": "115200", + "label": "115200" + } + ] + } + ] + }, + "C5_generic": { + "key": "micropython:esp32c5:generic", + "config": [ + { + "key": "BurnSpeed", + "label": "Burn Speed", + "messageId": "MICROPYTHON_CONFIG_MESSAGE_BURN_SPEED", + "options": [ + { + "key": "921600", + "label": "921600" + }, + { + "key": "460800", + "label": "460800" + }, + { + "key": "230400", + "label": "230400" + }, + { + "key": "115200", + "label": "115200" + } + ] + } + ] + } + }, + "language": "MicroPython", + "burn": { + "type": "command", + "portSelect": "all", + "micropython:esp32c5:mixgo_sowl": { + "command": "\"{esptool}\" --chip esp32c5 --port {com} --baud {baudrate} --after hard_reset write_flash -e 0x2000 \"{indexPath}/build/Mixgo_Sowl_lib-v1.27.0.bin\" 0x700000 \"{indexPath}/../micropython/build/HZK12.bin\"" + }, + "micropython:esp32c5:generic": { + "command": "\"{esptool}\" --chip esp32c5 --port {com} --baud {baudrate} --after=no_reset write_flash -e 0x2000 \"{indexPath}/build/Generic_C5_lib-v1.27.0.bin\" 0x3A0000 \"{indexPath}/../micropython/build/HZK12.bin\"" + } + }, + "upload": { + "type": "command", + "portSelect": "all", + "libPath": [ + "{indexPath}/build/lib", + "{indexPath}/../micropython/build/lib" + ], + "command": "\"{ampy}\" -p {com} -d 1 -r \"{reset}\" put \"{indexPath}/build/upload\"", + "filePath": "{indexPath}/build/upload/main.py", + "copyLib": false, + "reset": [] + }, + "nav": { + "burn": true, + "upload": true, + "save": { + "py": true + }, + "setting": { + "thirdPartyLibrary": true + } + }, + "serial": { + "ctrlCBtn": true, + "ctrlDBtn": true, + "baudRates": 115200, + "yMax": 100, + "yMin": 0, + "pointNum": 100, + "rts": true, + "dtr": true + }, + "lib": { + "mixly": { + "url": [ + "http://download.mixlylibs.cloud/mixly3-packages/cloud-libs/micropython_esp32c5/libs.json" + ] + } + }, + "pythonToBlockly": false, + "web": { + "devices": { + "serial": true, + "hid": true, + "usb":true + }, + "burn": { + "erase": true, + "micropython:esp32c5:mixgo_sowl": { + "binFile": [ + { + "offset": "0x2000", + "path": "./build/Mixgo_Sowl_lib-v1.27.0.bin" + }, { + "offset": "0x700000", + "path": "../micropython/build/HZK12.bin" + } + ] + }, + "micropython:esp32c5:generic": { + "binFile": [ + { + "offset": "0x2000", + "path": "./build/Generic_C5_lib-v1.27.0.bin" + }, { + "offset": "0x3A0000", + "path": "../micropython/build/HZK12.bin" + } + ] + } + }, + "upload": { + "reset": [] + } + } +} diff --git a/boards/default_src/micropython_esp32c5/origin/examples/map.json b/boards/default_src/micropython_esp32c5/origin/examples/map.json new file mode 100644 index 00000000..9e26dfee --- /dev/null +++ b/boards/default_src/micropython_esp32c5/origin/examples/map.json @@ -0,0 +1 @@ +{} \ No newline at end of file diff --git a/boards/default_src/micropython_esp32c5/origin/media/esp32c5_compressed.png b/boards/default_src/micropython_esp32c5/origin/media/esp32c5_compressed.png new file mode 100644 index 00000000..4accaa71 Binary files /dev/null and b/boards/default_src/micropython_esp32c5/origin/media/esp32c5_compressed.png differ diff --git a/boards/default_src/micropython_esp32c5/package.json b/boards/default_src/micropython_esp32c5/package.json new file mode 100644 index 00000000..5d01e1f4 --- /dev/null +++ b/boards/default_src/micropython_esp32c5/package.json @@ -0,0 +1,34 @@ +{ + "name": "@mixly/micropython-esp32c5", + "version": "1.0.0", + "description": "适用于mixly的micropython esp32c5模块", + "scripts": { + "serve": "webpack-dev-server --config=webpack.dev.js", + "build:dev": "webpack --config=webpack.dev.js", + "build:prod": "npm run build:examples & webpack --config=webpack.prod.js & npm run build:libraries", + "build:examples": "node ../../../scripts/build-examples.js -t special", + "build:examples:ob": "node ../../../scripts/build-examples.js -t special --obfuscate", + "build:libraries": "python ../../../scripts/build-libraries.py ../../default/micropython_esp32c5/build/lib", + "publish:board": "npm publish --registry https://registry.npmjs.org/" + }, + "main": "./export.js", + "author": "Mixly Team", + "keywords": [ + "mixly", + "mixly-plugin", + "micropython-esp32c5" + ], + "homepage": "https://gitee.com/bnu_mixly/mixly3/tree/master/boards/default_src/micropython_esp32c5", + "bugs": { + "url": "https://gitee.com/bnu_mixly/mixly3/issues" + }, + "repository": { + "type": "git", + "url": "https://gitee.com/bnu_mixly/mixly3.git", + "directory": "default_src/micropython_esp32c5" + }, + "publishConfig": { + "access": "public" + }, + "license": "Apache 2.0" +} \ No newline at end of file diff --git a/boards/default_src/micropython_esp32c5/template.xml b/boards/default_src/micropython_esp32c5/template.xml new file mode 100644 index 00000000..ee2e2244 --- /dev/null +++ b/boards/default_src/micropython_esp32c5/template.xml @@ -0,0 +1,8029 @@ +<%= htmlWebpackPlugin.tags.headTags.join('\n') %> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0 + + + + + + + + + + 2000 + + + + + + + + + + + + + + + + + + + + + + attachInterrupt_func + + + + + + + + attachInterrupt_func + + + + + + + + + + + + + + + + + + 1 + + + + + + + + 0,1,2,3 + + + + + 0 + + + + + 5 + + + + + 1 + + + + + + + i + + + + + + + + + + + 500 + + + + + 0 + + + + + + + + + + + DIVIDE + + + 1 + + + + + 0 + + + + + + + + + Exception as e + + + + + + + e + + + + + + + + + testThread + + + + + + + + + + testThread + + + WHILE + + + TRUE + + + + + + + Hello Mixly from Thread! + + + + + ms + + + 10 + + + + + + + + + + + + + tim + + + + + + + + + 1000 + + + + + tim_callback + + + + + + + + tim_callback + + + + + + + + + + + + + + + + 2000 + + + + + + + + + + + + + + + + + + + + + + + + 90 + + + + + + + x + + + + + + + 15 + + + + + + + 1 + + + + + 1 + + + + + + + 0 + + + + + 0 + + + + + + + a + + + + + 1 + + + + + + + 0.998 + + + + + + + 1 + + + + + 2 + + + + + + + 4.8 + + + + + 2 + + + + + + + + 997 + + + + + + + 1 + + + + + 100 + + + + + + + 1010 + + + + + + 1000 + + + + + 1 + + + + + 100 + + + + + + + 50 + + + + + 1 + + + + + 100 + + + + + 1 + + + + + 1000 + + + + + + + 1 + + + + + + + 1 + + + + + + + + + + 0 + + + + + x + + + + + 2 + + + + + + + + + + + + x + + + + + 0,1,2,3 + + + + + + + 0,1,2,3 + + + + + 0,1,2,3 + + + + + + + x + + + + + + + Mixly + + + + + Mixly + + + + + Hello + + + + + Mixly + + + + + + + + 65 + + + + + + + a + + + + + + + x + + + + + + + Mixly + + + + + + + + + + + + + + + + + + + Mixly + + + + + 0 + + + + + + + Mixly + + + + + 0 + + + + + 2 + + + + + + + Mixly + + + + + + + Mixly + + + + + + + + Hello,mixly + + + + + l + + + + + + + -- + + + + + mylist + + + + + + + Hello,mixly + + + + + mixly + + + + + mixpy + + + + + + + I love mixly! + + + + + + + + + + + + I love mixly + + + + + + + + Random No. is {} + + + + + int + + + 1 + + + + + 100 + + + + + + + + + input('1+2*3') + + + + + + + + mylist + + + 1,2,3,4,5 + + + + + + + + mylist + + + + + 0 + + + + + + + mylist + + + + + 0 + + + + + 2 + + + + + + + mylist + + + + + + + + mylist + + + + + + + mylist + + + + + 0 + + + + + + + mylist + + + + + 0 + + + + + 0 + + + + + + + mylist + + + + + 0 + + + + + 0 + + + + + + + mylist + + + + + 0 + + + + + + + mylist + + + + + 0 + + + + + + + mylist + + + + + 0 + + + + + + + mylist + + + + + + + mylist + + + + + + + mylist + + + + + + + + x + + + + + + + + mytup + + + 1,2,3,4,5 + + + + + + + + mytup + + + + + 0 + + + + + + + mytup + + + + + 0 + + + + + 2 + + + + + + + mytup + + + + + + + mytup + + + + + + + mytup + + + + + + + mytup + + + + + 0 + + + + + + + mytup + + + + + + + mytup1 + + + + + mytup2 + + + + + + + + x + + + + + + + + + + mydict + + + + + + + mydict + + + + + key + + + + + + + mydict + + + + + key + + + + + 0 + + + + + + + mydict + + + + + key + + + + + 0 + + + + + + + mydict + + + + + key + + + + + + + mydict + + + + + key + + + + + + + mydict + + + + + key + + + + + 0 + + + + + + + mydict + + + + + + + + mydict + + + + + + + mydict + + + + + + + mydict + + + + + + + x + + + + + + + mydict + + + + + + + {"name":"Mixly","color":"green"} + + + + + + + + s1 + + + 1,2,3,4,5 + + + + + + + s1 + + + + + + + s1 + + + + + + + s1 + + + + + s2 + + + + + + + s1 + + + + + s2 + + + + + + + s1 + + + + + 0 + + + + + + + s1 + + + + + Mixly + + + + + + + s1 + + + + + s2 + + + + + + + x + + + + + + + + + + + + Mixly + + + + + + + Mixly + + + + + + + Mixly + + + + + , + + + + + + + + Hello + + + + + Mixly + + + + + + + prompt + + + + + + + 0 + + + + + 2 + + + + + + + Mixly + + + + + + + Mixly + + + + + + + 0XFF00FF + + + + + + + code + + + + + + + + + b + + + Mixly + + + + + Mixly + + + + + + + + + + + + + + + + + + + + + + + + + + + + 1 + + + + + + + + + + + attachInterrupt_func + + + + + + + + attachInterrupt_func + + + + + + + + + + + + + + + + + + + + + + + + + + + 0 + + + + + + + 0 + + + + + Mixly + + + + + + + 0 + + + + + Mixly + + + + + + + 2022 + + + + + 7 + + + + + 1 + + + + + 14 + + + + + 20 + + + + + 45 + + + + + + + 2023,1,1,12,0,0 + + + + + + + + + + + + + + 18029 + + + + + + + 2023,1,1,12,0,0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 100 + + + + + + + + + + + + + + 440 + + + + + + + 440 + + + + + 1000 + + + + + + + 0 + + + + + + + 100 + + + + + + + + + + + + + + + + + 4 + + + + + 120 + + + + + + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + + + 0 + + + + + 0 + + + + + 0 + + + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 1000 + + + + + + + 1000 + + + + + + + + + 100 + + + + + + + + 20000 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Hello, Mixly! + + + + + 10 + + + + + + + + + + + + + + + + + + + + + + 0 + + + + + 0 + + + + + 1 + + + + + #ffffff + + + 255,255,0 + + + + + + + + + + + Mixly + + + + + 0 + + + + + + + + + + + Mixly + + + + + 0 + + + + + 0 + + + + + 1 + + + + + 0 + + + + + #ffffff + + + 255,255,0 + + + + + + + + + + + Mixly + + + + + 0 + + + + + 0 + + + + + 1 + + + + + #ffffff + + + 255,255,0 + + + + + + + + + + + mixly.jpg + + + + + + + + + + + mixly + + + + + + + + + + + Mixly + + + + + 0 + + + + + 0 + + + + + 1 + + + + + #ffffff + + + 255,255,0 + + + + + + + + + + + Mixly + + + + + + + Mixly + + + + + 0 + + + + + 5 + + + + + 5 + + + + + 0 + + + + + #ffffff + + + 255,255,0 + + + + + + + Mixly + + + + + + + Mixly + + + + + 5 + + + + + 500 + + + + + #ffffff + + + 255,255,0 + + + + + + + 0 + + + + + 0 + + + + + 20 + + + + + #ffffff + + + 255,255,0 + + + + + + + + + + + 0 + + + + + 0 + + + + + 50 + + + + + 50 + + + + + #ffffff + + + 255,255,0 + + + + + + + + + + + 20 + + + + + 20 + + + + + 20 + + + + + 15 + + + + + #ffffff + + + 255,255,0 + + + + + + + + + + + 60 + + + + + 60 + + + + + 40 + + + + + #ffffff + + + 255,255,0 + + + + + + + + + + + 1 + + + + + + + + + + + 0 + + + + + 0 + + + + + + + 0 + + + + + 0 + + + + + #ffffff + + + 255,255,0 + + + + + + + + + + + + 0.5 + + + + + + + #ffffff + + + 255,255,0 + + + + + + + + + + + + + + + + + + new_clock + + + + + 160 + + + + + 120 + + + + + 40 + + + + + #ffffff + + + 255,255,0 + + + + + + + new_clock + + + + + + + new_clock + + + + + 8 + + + + + 20 + + + + + 0 + + + + + + + new_clock + + + + + + + new_clock + + + + + 0x000000 + + + 0,0,0 + + + + + + + 0 + + + + + #ffffff + + + 255,255,0 + + + + + + + + + + + + + + + + + + + + + + + + + + 你们,米思齐 + + + 3 + + + + + + + + + mixly.jpg + + + + + + + image + + + + + + + + + + + + Model + + + + + + + + + + + + + + + Model + + + + + + + Model + + + + + name + + + + + + + Model + + + + + + + Model + + + + + + + + + + + Model + + + + + + + + + + + Model + + + + + + + + + + + + Model + + + + + + + + + + + + Model + + + + + + + + + + + Model + + + + + + + + + + + Model + + + + + + + + + + + + + + + + + + + + + + + + image + + + + + + + + + image + + + + + 90 + + + + + + + image + + + + + + + image + + + + + mixly.jpg + + + + + 90 + + + + + image + + + + + mixly.jpg + + + + + 240 + + + + + 240 + + + + + + + image + + + + + https://gitee.com/dahanzimin/test/raw/master/pic/mixly.jpg + + + + + 240 + + + + + 240 + + + + + + + + + + mixly.jpg + + + + + + + + + + + mixly.jpg + + + + + 0 + + + + + 0 + + + + + + + + + image + + + + + + image + + + + + 0 + + + + + 0 + + + + + 240 + + + + + 240 + + + + + + + + + image + + + + + + + + + + + image + + + + + 0 + + + + + 0 + + + + + + + + + + + Model + + + + + + + + + + + + + + + Model + + + + + + + + + + + + + face.db + + + + + + + Model + + + + + + + Model + + + + + 256 + + + + + + + Model + + + + + 0,0,0 + + + + + 255,255,255 + + + + + color + + + + + 256 + + + + + + + Model + + + + + image + + + + + name + + + + + + + Model + + + + + 1 + + + + + + + Model + + + + + + + Model + + + + + _results + + + + + Model + + + + + image + + + + + + + + + _results + + + + + + + _results + + + + + + + _results + + + + + 0 + + + + + + + _results + + + + + 0 + + + + + + + _results + + + + + 0 + + + + + + + _results + + + + + 0 + + + + + + + _results + + + + + 0 + + + + + + + + + + + + wifiname + + + + + wifipassword + + + + + + + mixio.mixly.cn + + + + + + + + + + + + mixio.mixly.cn + + + + + A1B2C3 + + + + + + + mixio.mixly.cn + + + + + username + + + + + password + + + + + MyProject + + + + + + + topic + + + + + msg + + + + + + + topic + + + + + msg + + + + + + + topic + + + + + method + + + + + + + + + + method + + + + + EQ + + + msg + + + + + 1 + + + + + + + + + + + content + + "long" + "lat" + "message" + + + 0 + + + + + 1 + + + + + 2 + + + + + + + + + content + + "key1" + "key2" + "key3" + + + 0 + + + + + 1 + + + + + 2 + + + + + + + + + + + + + + + https://mixio.mixly.cn/time.php + + + + + + + + mixio.mixly.cn + + + + + + + + 12.jpg + + + + + + + + + wifiname + + + + + wifipassword + + + + + + + c + + + + + sub_cb + + + + + 31444082 + + + + + 183.230.40.39 + + + + + 141092 + + + + + 61n63JySRowo13ZLDBKw6y896E0= + + + + + MixlyRobot + + + + + + + + + sub_cb + + + + + EQ + + + msg + + + + + 1 + + + + + + + + + + + c + + + + + + iot_dict + "tc" + + + + + tc0 + + + + + + + + + c + + + + + iot_dict + + + + + + + + c + + + + + + + c + + + + + + + + + wifiname + + + + + wifipassword + + + + + + + client + + + + + Enter Your API_KEY + + + + + Enter Your SECRET_KEY + + + + + + + client + + + + + 1 + + + + + + + client + + + + + S72099 + + + + + 北京今天天气如何? + + + + + + + + + wifiname + + + + + wifipassword + + + + + + + + SVa3S0UKHIy9dDArs + + + + + 北京 + + + + + + + + + + + + + + SVa3S0UKHIy9dDArs + + + + + 北京 + + + + + 1 + + + + + + + 1 + + + + + + + 1 + + + + + + + 1 + + + + + + + 1 + + + + + + + + + https://mixio.mixly.cn/tinydb + + + + + username + + + + + password + + + + + + + mqtt_client + + + + + + + mixly + + + + + hello + + + + + + + mixly + + + + + + + + + 1 + + + + + 1 + + + + + mixly + + + + + + + mixly + + + + + + + + + + + ble_c + + + + + + + ble_p + + + + + Mixly + + + + + + + ble_c + + + + + + + ble_c + + + + + Mixly + + + + + + + ble_c + + + + + + + ble_x + + + + + + + ble_x + + + + + + + ble_x + + + + + Mixly + + + + + + + ble_x + + + + + + + ble_x + + + + + ble_method + + + + + + + + ble_method + + + + + EQ + + + data + + + + + Mixly + + + + + + + + + + + + + handle + + + + + handle_method + + + + + + + + + + + handle_method + + + + + + key1 + + + + + key2 + + + + + key3 + + + + + keyx + + + + + + + + + + + + ble_keyboard_mouse + + + + + + + + + 10 + + + + + + + + + + + + + + + + + Hello, Mixly! + + + + + 10 + + + + + + + + + + + + + + + + + + + + + + + + + + + + i2c + + + + + 22 + + + + + 21 + + + + + 100000 + + + + + + + i2c + + + + + 0 + + + + + 0 + + + + + + + i2c + + + + + 0 + + + + + 0 + + + + + + + i2c + + + + + + + i2c + + + + + + + i2c + + + + + + + + + + spi + + + + + 200000 + + + + + 0 + + + + + 4 + + + + + 5 + + + + + + + spi + + + + + 200000 + + + + + + + buf + + + + + 50 + + + + + + + spi + + + + + 10 + + + + + + + spi + + + + + 10 + + + + + 0xff + + + + + + + spi + + + + + buf + + + + + + + spi + + + + + buf + + + + + 0xff + + + + + + + spi + + + + + 12345 + + + + + + + spi + + + + + 12345 + + + + + buf + + + + + + + + + + 1 + + + + + + + + + + Mixly + + + + + + + + + + + + + + + + + + + + + ow + + + + + 12 + + + + + + + ow + + + + + + + ow + + + + + + + ow + + + + + 12345 + + + + + + + ow + + + + + 12345 + + + + + + + ow + + + + + + + + + my_now + + + + + 0 + + + + + + + my_now + + + + + + + my_now + + + + + + + my_now + + + + + FFFFFFFFFFFF + + + + + mixly + + + + + + + my_now + + + + + + + my_now + + + + + cb + + + + + + + + + cb + + + + + EQ + + + msg + + + + + 1 + + + + + + + + + + + + + spi + + + + + 1000000 + + + + + 4 + + + + + 5 + + + + + 12 + + + + + + + spi + + + + + 8 + + + + + my_lora + + + + + 433.92 + + + + + 5 + + + + + 7 + + + + + 16 + + + + + + + my_lora + + + + + + + my_lora + + + + + + + my_lora + + + + + Mixly + + + + + + + + + + i2c_extend + + + + + 4 + + + + + 5 + + + + + 100000 + + + + + + + xsensor + + + + + i2c_extend + + + + + + + + + xsensor + + + + + + + xsensor + + + + + + + xsensor + + + + + + + xsensor + + + + + + + xsensor + + + + + + + xsensor + + + + + + + xsensor + + + + + + + xsensor + + + + + + + xsensor + + + + + + + xsensor + + + + + + + xsensor + + + + + + + xsensor + + + + + + + xsensor + + + + + 1013.25 + + + + + + + xsensor + + + + + + + xsensor + + + + + + + xsensor + + + + + + + xsensor + + + + + + + xsensor + + + + + + + xsensor + + + + + + + xsensor + + + + + + + xsensor + + + + + + + xsensor + + + + + 5000 + + + + + 500 + + + + + + + xsensor + + + + + + + xsensor + + + + + + + xsensor + + + + + + + xsensor + + + + + + + xsensor + + + + + + + + + + xsensor + + + + + + + spi + + + + + 1000000 + + + + + 4 + + + + + 5 + + + + + 12 + + + + + + + spi + + + + + 8 + + + + + ysensor + + + + + + + + + + ysensor + + + + + + + ysensor + + + + + 0 + + + + + + + ysensor + + + + + 0 + + + + + + + ysensor + + + + + 0 + + + + + Mixly + + + + + + + ysensor + + + + + 0 + + + + + Mixly + + + + + + + + ysensor + + + + + + + ysensor + + + + + + 39,119.96,31.67 + + + + + + + ysensor + + + + + + + ysensor + + + + + station + + + + + + + + + + + + + + + + + 4 + + + + + 5 + + + + + + + + ps2_handle + + + + + 2 + + + + + 4 + + + + + 5 + + + + + 12 + + + + + + + ps2_handle + + + + + 50 + + + + + + + ps2_handle + + + + + + + ps2_handle + + + + + + + ws_wr + + + + + 1 + + + + + 2 + + + + + 3 + + + + + + + ws_wr + + + + + + + ws_wr + + + + + + + ws_wr + + + + + 3600 + + + + + + + 1 + + + + + 0 + + + + + + + zsensor + + + + + + + + + zsensor + + + + + + + zsensor + + + + + + + zsensor + + + + + + + zsensor + + + + + + + weight + + + + + 1 + + + + + 2 + + + + + 500 + + + + + + + weight + + + + + KEYPAD_4_4 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 1 + 2 + 3 + A + 4 + 5 + 6 + B + 7 + 8 + 9 + C + * + 0 + # + D + + + + + KEYPAD_4_4 + + + + + var_re + + + + 3 + + + + 4 + + + + + 5 + + + + + rotary_cb + + + + + + + + + rotary_cb + + + + + + + + + + + midi + + + + + 0 + + + + + + + midi + + + + + 440 + + + + + + + midi + + + + + 440 + + + + + 1000 + + + + + + + midi + + + + + + + midi + + + + + 100 + + + + + + + + + + midi + + + + + + + + + + midi + + + + + + + midi + + + + + 4 + + + + + 120 + + + + + + + midi + + + + + + + midi + + + + + + + rgb + + + + + 0 + + + + + 4 + + + + + + + rgb + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 0 + + + + + + + rgb + + + + + 0 + + + + + 0 + + + + + 0 + + + + + + + rgb + + + + + 0 + + + + + 0 + + + + + 0 + + + + + 1000 + + + + + + + rgb + + + + + 1000 + + + + + + + rgb + + + + + + + + + + 100 + + + + + + + + + + + + + + + 100 + + + + + + + + + + + + i2c_extend + + + + + 4 + + + + + 5 + + + + + 400000 + + + + + + + Motor + + + + + i2c_extend + + + + + + + + + Motor + + + + + 100 + + + + + + + + Motor + + + + + 1024 + + + + + 1024 + + + + + + + 0 + + + + + 2 + + + + + + + actuator + + + + + + + + + actuator + + + + + + + + + + actuator + + + + + + + actuator + + + + + + + + + + actuator + + + + + 你好米思齐 + + + + + + + + + + actuator + + + + + + + actuator + + + + + + + actuator + + + + + 20 + + + + + + + actuator + + + + + + + actuator + + + + + mixly*.mp3 + + + + + + + + + + + i2c_extend + + + + + 4 + + + + + 5 + + + + + 400000 + + + + + + + matrix + + + + + i2c_extend + + + + + + + + + matrix + + + + + + + matrix + + + + + + + + + matrix + + + + + Mixly + + + + + 0 + + + + + + + matrix + + + + + Mixly + + + + + + + matrix + + + + + Mixly + + + + + 50 + + + + + 0 + + + + + + + matrix + + + + + Mixly + + + + + + + matrix + + + + + Mixly + + + + + 500 + + + + + + + + + matrix + + + + + + + + matrix + + + + + + + + + + + + + matrix + + + + + + + + + + matrix + + + + + 1 + + + + + + + matrix + + + + + + + + + + + + + matrix + + + + + + + + + + + + + + + + + matrix + + + + + 0.5 + + + + + + + matrix + + + + + + + matrix + + + + + + + + + + + + disp + + + + + 3 + + + + + 4 + + + + + + + + disp + + + + + 2333 + + + + + + + disp + + + + + + + + + + + + + + disp + + + + + 1 + + + + + + + + + i2c_extend + + + + + 4 + + + + + 5 + + + + + 100000 + + + + + + + lcd + + + + + i2c_extend + + + + + 0x27 + + + + + + + + + + lcd + + + + + Mixly + + + + + 0 + + + + + 0 + + + + + + + lcd + + + + + Mixly + + + + + 0 + + + + + 0 + + + + + 5 + + + + + + + lcd + + + + + + + lcd + + + + + + + + + i2c_extend + + + + + 4 + + + + + 5 + + + + + 100000 + + + + + + + oled + + + + + i2c_extend + + + + + 0x3c + + + + + + + + + + oled + + + + + + + + + + + oled + + + + + + + + + 0 + + + + + 0 + + + + + 1 + + + + + + + oled + + + + + Mixly + + + + + + + oled + + + + + Mixly + + + + + 0 + + + + + 0 + + + + + 1 + + + + + 0 + + + + + + + oled + + + + + Mixly + + + + + + + oled + + + + + Mixly + + + + + 0 + + + + + 5 + + + + + 5 + + + + + 0 + + + + + + + oled + + + + + Mixly + + + + + + + oled + + + + + Mixly + + + + + 5 + + + + + 500 + + + + + + + oled + + + + + 0 + + + + + 0 + + + + + 20 + + + + + + + oled + + + + + 0 + + + + + 0 + + + + + 50 + + + + + 50 + + + + + + + oled + + + + + 20 + + + + + 20 + + + + + 20 + + + + + 15 + + + + + + + oled + + + + + 1 + + + + + + + oled + + + + + 0 + + + + + 0 + + + + + + + oled + + + + + 0 + + + + + 0 + + + + + + + + + + + oled + + + + + + + + + spi + + + + + 1000000 + + + + + 1 + + + + + 2 + + + + + 46 + + + + + + + spi + + + + + 4 + + + + + 5 + + + + + tft_st7789 + + + + + 135 + + + + + 240 + + + + + + + + + + tft_st7789 + + + + + + + + + 0 + + + + + 0 + + + + + 1 + + + + + #ffffff + + + 255,255,0 + + + + + + + tft_st7789 + + + + + Mixly + + + + + 0 + + + + + 0 + + + + + 5 + + + + + 0 + + + + + #ffffff + + + 255,255,0 + + + + + + + tft_st7789 + + + + + Mixly + + + + + 0 + + + + + 5 + + + + + 5 + + + + + 0 + + + + + #ffffff + + + 255,255,0 + + + + + + + tft_st7789 + + + + + Mixly + + + + + 5 + + + + + 500 + + + + + #ffffff + + + 255,255,0 + + + + + + + tft_st7789 + + + + + 0 + + + + + 0 + + + + + 40 + + + + + 40 + + + + + #ffffff + + + 255,255,0 + + + + + + + tft_st7789 + + + + + + + + + + 1 + + + + + 2 + + + + + + + ai_sensor + + + + + + + + + ai_sensor + + + + + 9 + + + + + 8 + + + + + + + ai_sensor + + + + + 255,255,0 + + + + + 0,0,255 + + + + + + + ai_sensor + + + + + 'ni-hao','hong-se','lv-se','lan-se','bai-se','hei-se' + + + + + 0.1 + + + + + + + ai_sensor + + + + + 1.wav + + + + + 5 + + + + + + + ai_sensor + + + + + 1.wav + + + + + 100 + + + + + + + ai_sensor + + + + + info + + + + + ai_sensor + + + + + + + + + + qrcode + + + + + info + + + + + ai_sensor + + + + + + + + + + barcode + + + + + info + + + + + ai_sensor + + + + + + + + + + tag + + + + + info + + + + + ai_sensor + + + + + 2500 + + + + + 25 + + + + + 25 + + + + + + + + + + line + + + + + info + + + + + ai_sensor + + + + + 3500 + + + + + 2 + + + + + 100 + + + + + + + + + + circle + + + + + info + + + + + ai_sensor + + + + + 10000 + + + + + + + + + + rect + + + + + info + + + + + ai_sensor + + + + + + + + + + info + + + + + info + + + + + ai_sensor + + + + + color_lab + + + + + 10 + + + + + 1 + + + + + + + + + + colors + + + + + + + ai_sensor + + + + + '猫','狗','笔记本','笔' + + + + + mixgo + + + + + 5 + + + + + 自模型训练 + + + + + info + + + + + ai_sensor + + + + + '猫','狗','笔记本','笔' + + + + + mixgo + + + + + 自模型识别 + + + + + + + + objects + + + + + info + + + + + ai_sensor + + + + + 0.1606, 0.3562, 0.4712, 0.9568, 0.9877, 1.9108, 1.8761, 3.5310, + 3.4423, 5.6823 + + + + + /sd/masks.kmodel + + + + + 外部模型加载 + + + + + + + + objects + + + + + + + + + 1 + + + + + 2 + + + + + + + ai_sensor + + + + + + + + + ai_sensor + + + + + 9 + + + + + 8 + + + + + + + ai_sensor + + + + + 255,255,0 + + + + + 0,0,255 + + + + + + + ai_sensor + + + + + 1.wav + + + + + 5 + + + + + + + ai_sensor + + + + + 1.wav + + + + + 100 + + + + + + info + + + + + ai_sensor + + + + + + + + + licensePlate + + + + + info + + + + + ai_sensor + + + + + + + + + face + + + + + info + + + + + ai_sensor + + + + + + + + + 20objects + + + + + + + ai_sensor + + + + + info + + + + + ai_sensor + + + + + + + + + + qrcode + + + + + info + + + + + ai_sensor + + + + + + + + + + barcode + + + + + info + + + + + ai_sensor + + + + + + + + + + tag + + + + + info + + + + + ai_sensor + + + + + 2500 + + + + + 25 + + + + + 25 + + + + + + + + + + line + + + + + info + + + + + ai_sensor + + + + + 3500 + + + + + 2 + + + + + 100 + + + + + + + + + + circle + + + + + info + + + + + ai_sensor + + + + + 10000 + + + + + + + + + + rect + + + + + info + + + + + ai_sensor + + + + + + + + + + info + + + + + info + + + + + ai_sensor + + + + + color_lab + + + + + 10 + + + + + 1 + + + + + + + + + + colors + + + + + + + + + + spi + + + + + 46 + + + + + sd + + + + + + + sd + + + + + /sd + + + + + + + + filename.txt + + + + + f + + + + + + + Mixly + + + + + f + + + + + + + f + + + + + + + f + + + + + 0 + + + + + + + f + + + + + + + f + + + + + + + f + + + + + + + + + path + + + + + + + path + + + + + + + filename.txt + + + + + + + srcname.txt + + + + + dstname.txt + + + + + + + + f + + + + + + + f + + + + + 0 + + + + + + + + + + wifiname + + + + + wifipassword + + + + + + + wlan + + + + + + + wlan + + + + + + + wlan + + + + + + + wlan + + + + + + + wlan + + + + + 127.16.0.8 + + + + + 01234567 + + + + + + + wlan + + + + + + + wlan + + + + + + + wlan + + + + + + + wlan + + + + + + + wlan + + + + + mixly + + + + + 12345678 + + + + + 1 + + + + + connect_wifi + + + + + wlan + + + + + AP + + + wlan + + + + + True + + + wlan + + + + + + + wlan + + + + + SmallCabbage + + + + + 123456 + + + + + 1 + + + + + WHILE + + + TRUE + + + EQ + + + 0 + + + wlan + + + + + + + 0.0.0.0 + + + + + + + ms + + + 1000 + + + + + + + + + + + + + + + + + TRUE + + + + + + + s + + + + + + + s + + + + + + + + 0.0.0.0 + + + + + 80 + + + + + + + + + s + + + + + + + + 192.168.0.1 + + + + + 80 + + + + + + + + + s + + + + + 5 + + + + + + + s + + + + + + + s + + + + + + + s + + + + + 1024 + + + + + + + s + + + + + b + + + Mixly + + + + + response + + + + + + + s + + + + + 1024 + + + + + + + s + + + + + b + + + Mixly + + + + + response + + + + + + + + 127.0.0.1 + + + + + 80 + + + + + + + + + s + + + + + + + + ntp.aliyun.com + + + + + + + + response + + + + + http://mixio.mixly.cn + + + + + + + response + + + + + http://mixio.mixly.cn + + + + + + + + + + + + + + response + + + + + + + http://192.168.1.1:11434 + + + + + qwen2.5-coder:0.5b + + + + + 5 + + + + + + + https://api.deepseek.com + + + + + API Key + + + + + deepseek-chat + + + + + 5 + + + + + + + 请介绍一下米思齐? + + + + + content_callback + + + + + + + + content_callback + + + + + content + + + + + + + + + + + + + + 请介绍一下米思齐? + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/boards/default_src/micropython_esp32c5/webpack.common.js b/boards/default_src/micropython_esp32c5/webpack.common.js new file mode 100644 index 00000000..fe9489b3 --- /dev/null +++ b/boards/default_src/micropython_esp32c5/webpack.common.js @@ -0,0 +1,12 @@ +const path = require("path"); +const common = require("../../../webpack.common"); +const { merge } = require("webpack-merge"); + +module.exports = merge(common, { + resolve: { + alias: { + '@mixly/python': path.resolve(__dirname, '../python'), + '@mixly/micropython': path.resolve(__dirname, '../micropython') + } + } +}); \ No newline at end of file diff --git a/boards/default_src/micropython_esp32c5/webpack.dev.js b/boards/default_src/micropython_esp32c5/webpack.dev.js new file mode 100644 index 00000000..90d2b91a --- /dev/null +++ b/boards/default_src/micropython_esp32c5/webpack.dev.js @@ -0,0 +1,36 @@ +const path = require("path"); +const common = require("./webpack.common"); +const { merge } = require("webpack-merge"); +const HtmlWebpackPlugin = require("html-webpack-plugin"); +const ESLintPlugin = require('eslint-webpack-plugin'); + +module.exports = merge(common, { + mode: "development", + devtool: 'source-map', + plugins: [ + new ESLintPlugin({ + context: process.cwd(), + }), + new HtmlWebpackPlugin({ + inject: false, + template: path.resolve(process.cwd(), 'template.xml'), + filename: 'index.xml', + minify: false + }) + ], + devServer: { + https: true, + port: 8080, + host: '0.0.0.0', + hot: false, + static: { + directory: path.join(process.cwd(), '../../../'), + watch: false + }, + devMiddleware: { + index: false, + publicPath: `/boards/default/${path.basename(process.cwd())}`, + writeToDisk: false + } + } +}); \ No newline at end of file diff --git a/boards/default_src/micropython_esp32c5/webpack.prod.js b/boards/default_src/micropython_esp32c5/webpack.prod.js new file mode 100644 index 00000000..0e9f3265 --- /dev/null +++ b/boards/default_src/micropython_esp32c5/webpack.prod.js @@ -0,0 +1,27 @@ +const path = require("path"); +const common = require("./webpack.common"); +const { merge } = require("webpack-merge"); +const TerserPlugin = require("terser-webpack-plugin"); +var HtmlWebpackPlugin = require("html-webpack-plugin"); + +module.exports = merge(common, { + mode: "production", + optimization: { + minimize: true, + minimizer: [ + new TerserPlugin({ + extractComments: false, + }), + new HtmlWebpackPlugin({ + inject: false, + template: path.resolve(process.cwd(), 'template.xml'), + filename: 'index.xml', + minify: { + removeAttributeQuotes: true, + collapseWhitespace: true, + removeComments: true, + } + }) + ] + } +}); \ No newline at end of file