初始化提交
This commit is contained in:
@@ -0,0 +1,99 @@
|
||||
import { Profile } from 'mixly';
|
||||
|
||||
const pins = {};
|
||||
|
||||
pins["MixGo CE"] = {
|
||||
description: "MicroPython[ESP32C3 MixGo CE]",
|
||||
digital_pin: Profile.generate(['0-18', '21-46']),
|
||||
input_pin: Profile.generate(['0-18', '21-46']),
|
||||
output_pin: Profile.generate(['0-18', '21-45']),
|
||||
pwm_input: Profile.generate(['0-18', '21-46'], 'pwm', 'pwm'),
|
||||
analog_input: Profile.generate(['0-18', '21-46'], 'adc', 'adc'),
|
||||
pwm_output: Profile.generate(['0-18', '21-45'], 'pwm', 'pwm'),
|
||||
analog_output: Profile.generate(['0-18', '21-45'], 'adc', 'adc'),
|
||||
espnow_channel: Profile.generate(['1-13']),
|
||||
haskylens_model: Profile.generate(['0-4']),
|
||||
digital: Profile.generate(['0-18', '21-45'], 'pin', 'pin'),
|
||||
pwm_pin: Profile.generate(['0-18', '21-45']),
|
||||
pwm: Profile.generate(['0-18', '21-45'], 'pwm', 'pwm'),
|
||||
analog_pin: Profile.generate(['1-18']),
|
||||
analog: Profile.generate(['1-18'], 'adc', 'adc'),
|
||||
dac_pin: Profile.generate(['17-18']),
|
||||
dac: Profile.generate(['17-18'], 'dac', 'dac'),
|
||||
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", "onboard_matrix.HEART"], ["HEART_SMALL", "onboard_matrix.HEART_SMALL"], ["HAPPY", "onboard_matrix.HAPPY"], ["SAD", "onboard_matrix.SAD"], ["SMILE", "onboard_matrix.SMILE"], ["SILLY", "onboard_matrix.SILLY"], ["FABULOUS", "onboard_matrix.FABULOUS"], ["SURPRISED", "onboard_matrix.SURPRISED"], ["ASLEEP", "onboard_matrix.ASLEEP"], ["ANGRY", "onboard_matrix.ANGRY"], ["CONFUSED", "onboard_matrix.CONFUSED"], ["NO", "onboard_matrix.NO"], ["YES", "onboard_matrix.YES"], ["LEFT_ARROW", "onboard_matrix.LEFT_ARROW"], ["RIGHT_ARROW", "onboard_matrix.RIGHT_ARROW"], ["DRESS", "onboard_matrix.DRESS"], ["TRANSFORMERS", "onboard_matrix.TRANSFORMERS"], ["SCISSORS", "onboard_matrix.SCISSORS"], ["EXIT", "onboard_matrix.EXIT"], ["TREE", "onboard_matrix.TREE"], ["PACMAN", "onboard_matrix.PACMAN"], ["TARGET", "onboard_matrix.TARGET"], ["TSHIRT", "onboard_matrix.TSHIRT"], ["ROLLERSKATE", "onboard_matrix.ROLLERSKATE"], ["DUCK", "onboard_matrix.DUCK"], ["HOUSE", "onboard_matrix.HOUSE"], ["TORTOISE", "onboard_matrix.TORTOISE"], ["BUTTERFLY", "onboard_matrix.BUTTERFLY"], ["STICKFIGURE", "onboard_matrix.STICKFIGURE"], ["GHOST", "onboard_matrix.GHOST"], ["PITCHFORK", "onboard_matrix.PITCHFORK"], ["MUSIC_QUAVERS", "onboard_matrix.MUSIC_QUAVERS"], ["MUSIC_QUAVER", "onboard_matrix.MUSIC_QUAVER"], ["MUSIC_CROTCHET", "onboard_matrix.MUSIC_CROTCHET"], ["COW", "onboard_matrix.COW"], ["RABBIT", "onboard_matrix.RABBIT"], ["SQUARE_SMALL", "onboard_matrix.SQUARE_SMALL"], ["SQUARE", "onboard_matrix.SQUARE"], ["DIAMOND_SMALL", "onboard_matrix.DIAMOND_SMALL"], ["DIAMOND", "onboard_matrix.DIAMOND"], ["CHESSBOARD", "onboard_matrix.CHESSBOARD"], ["TRIANGLE_LEFT", "onboard_matrix.TRIANGLE_LEFT"], ["TRIANGLE", "onboard_matrix.TRIANGLE"], ["SNAKE", "onboard_matrix.SNAKE"], ["UMBRELLA", "onboard_matrix.UMBRELLA"], ["SKULL", "onboard_matrix.SKULL"], ["GIRAFFE", "onboard_matrix.GIRAFFE"], ["SWORD", "onboard_matrix.SWORD"]],
|
||||
//builtinimg: [["HEART", "onboard_matrix.HEART"],["HEART_SMALL", "onboard_matrix.HEART_SMALL"],["HAPPY", "onboard_matrix.HAPPY"],["SAD", "onboard_matrix.SAD"],["SMILE", "onboard_matrix.SMILE"],["SILLY", "onboard_matrix.SILLY"],["FABULOUS", "onboard_matrix.FABULOUS"],["SURPRISED", "onboard_matrix.SURPRISED"],["ASLEEP", "onboard_matrix.ASLEEP"],["ANGRY", "onboard_matrix.ANGRY"],["CONFUSED", "onboard_matrix.CONFUSED"],["NO", "onboard_matrix.NO"],["YES", "onboard_matrix.YES"]],
|
||||
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["ESP32S2 Generic"] = {
|
||||
description: "MicroPython[ESP32C3 MixGo CC]",
|
||||
digital_pin: Profile.generate(['0-42', '45']),
|
||||
input_pin: Profile.generate(['0-42', '45-46']),
|
||||
output_pin: Profile.generate(['0-42', '45']),
|
||||
pwm_input: Profile.generate(['0-42', '45-46'], 'pwm', 'pwm'),
|
||||
analog_input: Profile.generate(['0-18', '21-46'], 'adc', 'adc'),
|
||||
pwm_output: Profile.generate(['0-42', '45'], 'pwm', 'pwm'),
|
||||
analog_output: Profile.generate(['0-42', '45'], 'adc', 'adc'),
|
||||
espnow_channel: Profile.generate(['1-13']),
|
||||
haskylens_model: Profile.generate(['0-4']),
|
||||
digital: Profile.generate(['0-42', '45'], 'pin', 'pin'),
|
||||
pwm_pin: Profile.generate(['0-42', '45']),
|
||||
pwm: Profile.generate(['0-42', '45'], 'pwm', 'pwm'),
|
||||
analog_pin: Profile.generate(['1-20']),
|
||||
analog: Profile.generate(['1-20'], 'adc', 'adc'),
|
||||
dac_pin: Profile.generate(['17-18']),
|
||||
dac: Profile.generate(['17-18'], 'dac', 'dac'),
|
||||
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", "onboard_matrix.HEART"], ["HEART_SMALL", "onboard_matrix.HEART_SMALL"], ["HAPPY", "onboard_matrix.HAPPY"], ["SAD", "onboard_matrix.SAD"], ["SMILE", "onboard_matrix.SMILE"], ["SILLY", "onboard_matrix.SILLY"], ["FABULOUS", "onboard_matrix.FABULOUS"], ["SURPRISED", "onboard_matrix.SURPRISED"], ["ASLEEP", "onboard_matrix.ASLEEP"], ["ANGRY", "onboard_matrix.ANGRY"], ["CONFUSED", "onboard_matrix.CONFUSED"], ["NO", "onboard_matrix.NO"], ["YES", "onboard_matrix.YES"], ["LEFT_ARROW", "onboard_matrix.LEFT_ARROW"], ["RIGHT_ARROW", "onboard_matrix.RIGHT_ARROW"], ["DRESS", "onboard_matrix.DRESS"], ["TRANSFORMERS", "onboard_matrix.TRANSFORMERS"], ["SCISSORS", "onboard_matrix.SCISSORS"], ["EXIT", "onboard_matrix.EXIT"], ["TREE", "onboard_matrix.TREE"], ["PACMAN", "onboard_matrix.PACMAN"], ["TARGET", "onboard_matrix.TARGET"], ["TSHIRT", "onboard_matrix.TSHIRT"], ["ROLLERSKATE", "onboard_matrix.ROLLERSKATE"], ["DUCK", "onboard_matrix.DUCK"], ["HOUSE", "onboard_matrix.HOUSE"], ["TORTOISE", "onboard_matrix.TORTOISE"], ["BUTTERFLY", "onboard_matrix.BUTTERFLY"], ["STICKFIGURE", "onboard_matrix.STICKFIGURE"], ["GHOST", "onboard_matrix.GHOST"], ["PITCHFORK", "onboard_matrix.PITCHFORK"], ["MUSIC_QUAVERS", "onboard_matrix.MUSIC_QUAVERS"], ["MUSIC_QUAVER", "onboard_matrix.MUSIC_QUAVER"], ["MUSIC_CROTCHET", "onboard_matrix.MUSIC_CROTCHET"], ["COW", "onboard_matrix.COW"], ["RABBIT", "onboard_matrix.RABBIT"], ["SQUARE_SMALL", "onboard_matrix.SQUARE_SMALL"], ["SQUARE", "onboard_matrix.SQUARE"], ["DIAMOND_SMALL", "onboard_matrix.DIAMOND_SMALL"], ["DIAMOND", "onboard_matrix.DIAMOND"], ["CHESSBOARD", "onboard_matrix.CHESSBOARD"], ["TRIANGLE_LEFT", "onboard_matrix.TRIANGLE_LEFT"], ["TRIANGLE", "onboard_matrix.TRIANGLE"], ["SNAKE", "onboard_matrix.SNAKE"], ["UMBRELLA", "onboard_matrix.UMBRELLA"], ["SKULL", "onboard_matrix.SKULL"], ["GIRAFFE", "onboard_matrix.GIRAFFE"], ["SWORD", "onboard_matrix.SWORD"]],
|
||||
//builtinimg: [["HEART", "onboard_matrix.HEART"],["HEART_SMALL", "onboard_matrix.HEART_SMALL"],["HAPPY", "onboard_matrix.HAPPY"],["SAD", "onboard_matrix.SAD"],["SMILE", "onboard_matrix.SMILE"],["SILLY", "onboard_matrix.SILLY"],["FABULOUS", "onboard_matrix.FABULOUS"],["SURPRISED", "onboard_matrix.SURPRISED"],["ASLEEP", "onboard_matrix.ASLEEP"],["ANGRY", "onboard_matrix.ANGRY"],["CONFUSED", "onboard_matrix.CONFUSED"],["NO", "onboard_matrix.NO"],["YES", "onboard_matrix.YES"]],
|
||||
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"]],
|
||||
};
|
||||
|
||||
export default pins;
|
||||
359
boards/default_src/micropython_esp32s2/blocks/inout.js
Normal file
359
boards/default_src/micropython_esp32s2/blocks/inout.js
Normal file
@@ -0,0 +1,359 @@
|
||||
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_pwm_analog_write = {
|
||||
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_VALUE2)
|
||||
.setCheck(Number);
|
||||
this.setInputsInline(true);
|
||||
this.setPreviousStatement(true, null);
|
||||
this.setNextStatement(true, null);
|
||||
this.setTooltip(Blockly.Msg.MIXLY_ESP32_INOUT_PWM_ANALOG_WRITE_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_pwm_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_analog_read = {
|
||||
init: function () {
|
||||
this.setColour(BASE_HUE);
|
||||
this.appendValueInput("PIN", Number)
|
||||
.appendField(Blockly.Msg.MIXLY_MICROBIT_PY_STORAGE_GET)
|
||||
.appendField(Blockly.Msg.MIXLY_Analog_PINMODEIN)
|
||||
.setCheck(Number);
|
||||
this.appendDummyInput()
|
||||
.appendField(Blockly.Msg.MIXLY_ESP32_MACHINE_VALUE)
|
||||
this.setInputsInline(true);
|
||||
this.setOutput(true, Number);
|
||||
this.setTooltip(Blockly.Msg.MIXLY_ESP32_INOUT_ANALOG_READ_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_pwm_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('pwm#'), 'PIN_OBJ')
|
||||
.appendField(Blockly.Msg.MIXLY_MICROPYTHON_AS)
|
||||
this.appendDummyInput("")
|
||||
.appendField("PWM" + Blockly.Msg.MIXLY_Analog_PINMODEOUT)
|
||||
// .appendField('pwm')
|
||||
// .appendField(new Blockly.FieldDropdown(profile.default.pwm_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_PWM_ANALOG_WRITE_INIT_TOOLTIP);
|
||||
},
|
||||
getVars: function () {
|
||||
return [this.getFieldValue('PIN_OBJ') == 'pwm#' ? 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_analog_read_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('adc#'), 'PIN_OBJ')
|
||||
.appendField(Blockly.Msg.MIXLY_MICROPYTHON_AS)
|
||||
this.appendDummyInput("")
|
||||
.appendField(Blockly.Msg.MIXLY_Analog_PINMODEIN)
|
||||
// .appendField('adc')
|
||||
// .appendField(new Blockly.FieldDropdown(profile.default.adc_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_READ_INIT_TOOLTIP);
|
||||
},
|
||||
getVars: function () {
|
||||
return [this.getFieldValue('PIN_OBJ') == 'adc#' ? 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_pinMode = inout_digital_init;
|
||||
export const inout_analog_write_set_freq = inout_pwm_analog_write_set_freq;
|
||||
export const pin_pressed_init = inout_pin_pressed_init;
|
||||
export const pin_pressed = inout_pin_pressed;
|
||||
export const controls_pin_attachInterrupt = inout_pin_attachInterrupt;
|
||||
401
boards/default_src/micropython_esp32s2/blocks/pins.js
Normal file
401
boards/default_src/micropython_esp32s2/blocks/pins.js
Normal file
@@ -0,0 +1,401 @@
|
||||
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);
|
||||
}
|
||||
};
|
||||
Reference in New Issue
Block a user