@johnnycubides/micropython-esp32-plugin-catalejo-editor 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +10 -0
- package/micropython-esp32/README.md +10 -0
- package/micropython-esp32/commands.d.ts +20 -0
- package/micropython-esp32/consts.d.ts +55 -0
- package/micropython-esp32/esp32-libs/boot.py +13 -0
- package/micropython-esp32/esp32-libs/wifi.py +77 -0
- package/micropython-esp32/esp32-libs/wifi_config_esp32c3mini.py +14 -0
- package/micropython-esp32/http-request.d.ts +4 -0
- package/micropython-esp32/lang.d.ts +46 -0
- package/micropython-esp32/main.d.ts +36 -0
- package/micropython-esp32/micropython.es.d.ts +1 -0
- package/micropython-esp32/micropython.es.js +874 -0
- package/micropython-esp32/micropython.umd.js +351 -0
- package/micropython-esp32/types.d.ts +90 -0
- package/micropython-esp32/upy-websockect.d.ts +5 -0
- package/package.json +28 -0
package/README.md
ADDED
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
# Micropython esp32 plugin catalejo editor
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
Para activar el plugin se requiere anexar importar micropython_esp32 en `plugin.js`, ejemplo:
|
|
5
|
+
|
|
6
|
+
```js
|
|
7
|
+
import * as micropython_esp32 from "./micropython-esp32/micropython.es.js";
|
|
8
|
+
plugins.push(micropython_esp32)
|
|
9
|
+
defaultPaths.push("app/ui-app/plugins/micropython-esp32/esp32-libs")
|
|
10
|
+
```
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
# Micropython esp32 plugin catalejo editor
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
Para activar el plugin se requiere anexar importar micropython_esp32 en `plugin.js`, ejemplo:
|
|
5
|
+
|
|
6
|
+
```js
|
|
7
|
+
import * as micropython_esp32 from "./micropython-esp32/micropython.es.js";
|
|
8
|
+
plugins.push(micropython_esp32)
|
|
9
|
+
defaultPaths.push("app/ui-app/plugins/micropython-esp32/esp32-libs")
|
|
10
|
+
```
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { Project, PluginResult } from './types';
|
|
2
|
+
import { LANG } from './consts';
|
|
3
|
+
|
|
4
|
+
/** Envío de código de tarjeta de desarrollo en función del método [wifi, serial] */
|
|
5
|
+
declare function micropythonSend(project: Project, generateCode: Function): Promise<PluginResult>;
|
|
6
|
+
/** Reset de software */
|
|
7
|
+
declare function micropythonSoftReset(project: Project): Promise<PluginResult>;
|
|
8
|
+
/** Correr un programa en micropython */
|
|
9
|
+
declare function micropythonRunMain(project: Project): Promise<PluginResult>;
|
|
10
|
+
/** Conectarse por terminal "prompt" a micropython **/
|
|
11
|
+
declare function micropythonTerm(project: Project): Promise<PluginResult>;
|
|
12
|
+
/** Enviar archivo a través del puerto serial **/
|
|
13
|
+
declare function nodemcuSend(project: Project, generateCode: Function): Promise<PluginResult>;
|
|
14
|
+
/** Traducir blockly code a lua code */
|
|
15
|
+
declare function micropythonMagic(project: Project, generateCode: Function): Promise<PluginResult>;
|
|
16
|
+
/** Consultar los puertos seriales disponibles en el sistema **/
|
|
17
|
+
declare function getSerialPortList(): Promise<PluginResult>;
|
|
18
|
+
/** Entregar el enlace para visualizar la documentación */
|
|
19
|
+
declare function getUrlDocs(lang: LANG): Promise<PluginResult>;
|
|
20
|
+
export { micropythonSend, micropythonMagic, micropythonSoftReset, micropythonRunMain, micropythonTerm, getSerialPortList, getUrlDocs, nodemcuSend, };
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import { ProgLang } from './types';
|
|
2
|
+
|
|
3
|
+
export declare enum STATUS {
|
|
4
|
+
OK = 0,
|
|
5
|
+
FAILED = 1,
|
|
6
|
+
CHANGE = 2,
|
|
7
|
+
WITHOUTCHANGE = 3,
|
|
8
|
+
REQUEST = 4,// Solicitud para realizar algo
|
|
9
|
+
REQUEST_SELECT_FILE_IN_TABVIEW = 5,
|
|
10
|
+
EXISTS = 6,
|
|
11
|
+
NOEXIST = 7,
|
|
12
|
+
FOUND = 8,
|
|
13
|
+
NOTFOUND = 9,
|
|
14
|
+
ADDED = 10,
|
|
15
|
+
SAVED = 11,
|
|
16
|
+
UNSAVED = 12,
|
|
17
|
+
SET_WS = 13,
|
|
18
|
+
ENABLED = 14,
|
|
19
|
+
DESABLED = 15
|
|
20
|
+
}
|
|
21
|
+
export declare enum LANG {
|
|
22
|
+
EN = 0,
|
|
23
|
+
ES = 1
|
|
24
|
+
}
|
|
25
|
+
/** Tipo de resultados posibles a entrtegar al editor */
|
|
26
|
+
export declare enum TYPE_PLUGIN_RESULT {
|
|
27
|
+
TOAST = 0,
|
|
28
|
+
TEXT_PRINT = 1,
|
|
29
|
+
TEXT_AREA = 2,
|
|
30
|
+
URL_PRINT = 3,
|
|
31
|
+
TERM = 4
|
|
32
|
+
}
|
|
33
|
+
/** Tipo de conexión para terminal */
|
|
34
|
+
export declare enum TYPE_TERMINAL_CONNECTION {
|
|
35
|
+
WEBSOCKET = 0,
|
|
36
|
+
TCP_IP = 1,
|
|
37
|
+
SERIAL = 2
|
|
38
|
+
}
|
|
39
|
+
export declare const PYTHON: ProgLang;
|
|
40
|
+
export declare const CHUCK: ProgLang;
|
|
41
|
+
export declare const LUA: ProgLang;
|
|
42
|
+
export declare const JAVASCRIPT: ProgLang;
|
|
43
|
+
export declare const JSON: ProgLang;
|
|
44
|
+
export declare const PROG_LANG: ProgLang[];
|
|
45
|
+
export declare const TEXT_EXTENSION = "py";
|
|
46
|
+
export declare const BLOCKLY_EXTENSION = "json";
|
|
47
|
+
export declare const PLATFORM = "micropython-esp32";
|
|
48
|
+
/** Nombre del archivo a enviar a la tarjeta por defecto */
|
|
49
|
+
export declare const FILENAME_TO_RUN_DEFAULT = "main.py";
|
|
50
|
+
export declare const BLOCKLY_TEMPLATE = "{\"config\":{\"platform\":\"micropython-esp32\",\"send\":\"wifi\",\"ip_mpy\":\"192.168.4.1\",\"serialport\":\"\"},\"blocklycode\":\"<xml xmlns=\\\"https://developers.google.com/blockly/xml\\\"></xml>\"}";
|
|
51
|
+
export declare const LANG_TEMPLATE = "# platform: micropython-esp32\n# send: wifi\n# ip_mpy: 192.168.4.1\n# serialport: \n";
|
|
52
|
+
export declare enum MODE_TO_SEND {
|
|
53
|
+
WIFI = "wifi",
|
|
54
|
+
SERIAL = "serial"
|
|
55
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
# platform: micropython-esp32
|
|
2
|
+
# send: wifi
|
|
3
|
+
# ip_mpy: 192.168.4.1
|
|
4
|
+
# filename: boot.py
|
|
5
|
+
# Configuración de arranque para
|
|
6
|
+
# cualquier esp32
|
|
7
|
+
import webrepl
|
|
8
|
+
from wifi import do_ap, do_sta_connect
|
|
9
|
+
|
|
10
|
+
webrepl.start()
|
|
11
|
+
do_ap()
|
|
12
|
+
do_sta_connect()
|
|
13
|
+
gc.collect()
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
# platform: micropython-esp32
|
|
2
|
+
# send: wifi
|
|
3
|
+
# ip_mpy: 192.168.4.1
|
|
4
|
+
# filename: wifi.py
|
|
5
|
+
# Configuración para comunicación wifi
|
|
6
|
+
def do_ap():
|
|
7
|
+
import network
|
|
8
|
+
ap_if = network.WLAN(network.AP_IF)
|
|
9
|
+
mac = ''.join('%02x' % b for b in ap_if.config('mac'))[-5:]
|
|
10
|
+
if not network.WLAN(network.AP_IF).active() and not network.WLAN(network.STA_IF).isconnected():
|
|
11
|
+
print("Config...")
|
|
12
|
+
ap_if.config(essid='catalejo-'+mac, authmode=3, password='87654321')
|
|
13
|
+
ap_if.active(True)
|
|
14
|
+
print('WiFi name: ' + 'catalejo-' + mac)
|
|
15
|
+
print('PASS: ' + '87654321')
|
|
16
|
+
|
|
17
|
+
def led_ctr(led, state):
|
|
18
|
+
if led:
|
|
19
|
+
if state != None:
|
|
20
|
+
led.value(state)
|
|
21
|
+
else:
|
|
22
|
+
led.value(not led.value())
|
|
23
|
+
|
|
24
|
+
def but_ctr(but, logic):
|
|
25
|
+
if but:
|
|
26
|
+
return but.value() == logic
|
|
27
|
+
else:
|
|
28
|
+
return False
|
|
29
|
+
|
|
30
|
+
def do_sta_connect():
|
|
31
|
+
import network
|
|
32
|
+
import wifi_config
|
|
33
|
+
if not wifi_config.SSID or not wifi_config.PASS or not wifi_config.ATTE:
|
|
34
|
+
return
|
|
35
|
+
wlan = network.WLAN(network.STA_IF)
|
|
36
|
+
mac = ''.join('%02x' % b for b in network.WLAN(network.AP_IF).config('mac'))[-5:]
|
|
37
|
+
wlan.active(True)
|
|
38
|
+
from machine import Pin
|
|
39
|
+
import time
|
|
40
|
+
led = None
|
|
41
|
+
but = None
|
|
42
|
+
ret_but = None
|
|
43
|
+
if wifi_config.LED != None and wifi_config.LLED != None:
|
|
44
|
+
led = Pin(wifi_config.LED, Pin.OUT)
|
|
45
|
+
if wifi_config.BUT != None and wifi_config.LBUT != None:
|
|
46
|
+
but = Pin(wifi_config.BUT, Pin.IN)
|
|
47
|
+
led_ctr(led, wifi_config.LLED)
|
|
48
|
+
time.sleep(1.5)
|
|
49
|
+
ret_but = but_ctr(but, wifi_config.LBUT)
|
|
50
|
+
if not wlan.isconnected():
|
|
51
|
+
print('Connecting to network...')
|
|
52
|
+
wlan.connect(wifi_config.SSID, wifi_config.PASS)
|
|
53
|
+
attemps = 0
|
|
54
|
+
while not wlan.isconnected() and attemps < wifi_config.ATTE:
|
|
55
|
+
led_ctr(led, wifi_config.LLED)
|
|
56
|
+
time.sleep(0.1)
|
|
57
|
+
led_ctr(led, not wifi_config.LLED)
|
|
58
|
+
time.sleep(0.9)
|
|
59
|
+
attemps += 1
|
|
60
|
+
if wlan.isconnected():
|
|
61
|
+
led_ctr(led, wifi_config.LLED)
|
|
62
|
+
print("IP STA: ", wlan.ifconfig()[0])
|
|
63
|
+
print("Dev: catalejo-" + mac)
|
|
64
|
+
if ret_but :
|
|
65
|
+
time.sleep(3)
|
|
66
|
+
while not but_ctr(but, wifi_config.LBUT):
|
|
67
|
+
led_ctr(led, None)
|
|
68
|
+
print("IP STA: ", wlan.ifconfig()[0])
|
|
69
|
+
print("Dev: catalejo-" + mac)
|
|
70
|
+
time.sleep(1)
|
|
71
|
+
if not wifi_config.AP:
|
|
72
|
+
network.WLAN(network.AP_IF).active(False)
|
|
73
|
+
print("AP_IF off")
|
|
74
|
+
else:
|
|
75
|
+
wlan.active(False)
|
|
76
|
+
led_ctr(led, not wifi_config.LLED)
|
|
77
|
+
print("Don't connect how a STA")
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
# platform: micropython-esp32
|
|
2
|
+
# send: wifi
|
|
3
|
+
# ip_mpy: 192.168.4.1
|
|
4
|
+
# filename: wifi_config.py
|
|
5
|
+
# Configuración para el esp32c3mini
|
|
6
|
+
# Modifique unicamente el SSID y PASS
|
|
7
|
+
SSID = 'nombreDeRed'
|
|
8
|
+
PASS = 'Contrasena'
|
|
9
|
+
ATTE = 5
|
|
10
|
+
AP = False
|
|
11
|
+
LED = 8
|
|
12
|
+
LLED = 0
|
|
13
|
+
BUT = 9
|
|
14
|
+
LBUT = 0
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { Result, SerialOptions } from './types';
|
|
2
|
+
|
|
3
|
+
export declare function saveCode(portName: string, serialOptions: SerialOptions, timeout: number, fileName: string, content: string, blockSize: number): Promise<Result>;
|
|
4
|
+
export declare function getSerialPortList(): Promise<Result>;
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import { LANG } from './consts';
|
|
2
|
+
|
|
3
|
+
declare const itemsToolBarLang: {
|
|
4
|
+
micropythonSend: {
|
|
5
|
+
en: string;
|
|
6
|
+
es: string;
|
|
7
|
+
};
|
|
8
|
+
magic: {
|
|
9
|
+
en: string;
|
|
10
|
+
es: string;
|
|
11
|
+
};
|
|
12
|
+
getSerialportList: {
|
|
13
|
+
en: string;
|
|
14
|
+
es: string;
|
|
15
|
+
};
|
|
16
|
+
docs: {
|
|
17
|
+
en: string;
|
|
18
|
+
es: string;
|
|
19
|
+
};
|
|
20
|
+
reset: {
|
|
21
|
+
en: string;
|
|
22
|
+
es: string;
|
|
23
|
+
};
|
|
24
|
+
play: {
|
|
25
|
+
en: string;
|
|
26
|
+
es: string;
|
|
27
|
+
};
|
|
28
|
+
term: {
|
|
29
|
+
en: string;
|
|
30
|
+
es: string;
|
|
31
|
+
};
|
|
32
|
+
};
|
|
33
|
+
declare const dialogLabelCommands: {
|
|
34
|
+
docs: {
|
|
35
|
+
title: {
|
|
36
|
+
en: string;
|
|
37
|
+
es: string;
|
|
38
|
+
};
|
|
39
|
+
description: {
|
|
40
|
+
en: string;
|
|
41
|
+
es: string;
|
|
42
|
+
};
|
|
43
|
+
};
|
|
44
|
+
};
|
|
45
|
+
export declare function getTextFromLang(object: any, lang: LANG): string;
|
|
46
|
+
export { itemsToolBarLang, dialogLabelCommands, };
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { Project, PluginResult } from './types';
|
|
2
|
+
import { LANG } from './consts';
|
|
3
|
+
|
|
4
|
+
/** Valor que representa la plataforma para la cual es presentado este plugin */
|
|
5
|
+
declare const platform = "micropython-esp32";
|
|
6
|
+
/** Lenguaje interpretado con el que opera el plugin (indicar la extension en vez del nombre del lenguaje) */
|
|
7
|
+
declare const platformLang: import('./types').ProgLang;
|
|
8
|
+
/** Template para un nuevo proyecto en blockly */
|
|
9
|
+
declare const blockly_template = "{\"config\":{\"platform\":\"micropython-esp32\",\"send\":\"wifi\",\"ip_mpy\":\"192.168.4.1\",\"serialport\":\"\"},\"blocklycode\":\"<xml xmlns=\\\"https://developers.google.com/blockly/xml\\\"></xml>\"}";
|
|
10
|
+
/** Template para iniciar un proyecto en lenguaje de texto */
|
|
11
|
+
declare const lang_template = "# platform: micropython-esp32\n# send: wifi\n# ip_mpy: 192.168.4.1\n# serialport: \n";
|
|
12
|
+
/** Función para agregar a Blockly las funciones específicas de este plugin */
|
|
13
|
+
declare function initBlockly(blocklyRef: any, generatorRef: any, workspaceRef: any): void;
|
|
14
|
+
/** Función para traducir de blockly al lenguaje principal de operación de este plugin **/
|
|
15
|
+
declare function generateCode(): string;
|
|
16
|
+
/** Toolbox Blockly de este plugin */
|
|
17
|
+
declare const toolbox = "\n<xml id=\"toolbox\" style=\"display: none\">\n <category name=\"L\u00F3gica\" colour=\"%{BKY_LOGIC_HUE}\">\n <block type=\"controls_if\"></block>\n <block type=\"logic_compare\"></block>\n <block type=\"logic_operation\"></block>\n <block type=\"logic_negate\"></block>\n <block type=\"logic_boolean\"></block>\n <block type=\"logic_null\"></block>\n <block type=\"logic_ternary\"></block>\n </category>\n <category name=\"Secuencias\" colour=\"%{BKY_LOOPS_HUE}\">\n <block type=\"controls_repeat_ext\">\n <value name=\"TIMES\">\n <shadow type=\"math_number\">\n <field name=\"NUM\">10</field>\n </shadow>\n </value>\n </block>\n <block type=\"controls_whileUntil\"></block>\n <block type=\"controls_for\">\n <value name=\"FROM\">\n <shadow type=\"math_number\">\n <field name=\"NUM\">1</field>\n </shadow>\n </value>\n <value name=\"TO\">\n <shadow type=\"math_number\">\n <field name=\"NUM\">1</field>\n </shadow>\n </value>\n </block>\n <block type=\"controls_forEach\"></block>\n <block type=\"controls_flow_statements\"></block>\n </category>\n <category name=\"Matem\u00E1tica\" colour=\"%{BKY_MATH_HUE}\">\n <block type=\"math_number\"></block>\n <block type=\"math_arithmetic\">\n <value name=\"A\">\n <shadow type=\"math_number\">\n <field name=\"NUM\">1</field>\n </shadow>\n </value>\n <value name=\"B\">\n <shadow type=\"math_number\">\n <field name=\"NUM\">1</field>\n </shadow>\n </value>\n </block>\n <block type=\"math_single\">\n <value name=\"NUM\">\n <shadow type=\"math_number\">\n <field name=\"NUM\">9</field>\n </shadow>\n </value>\n </block>\n <block type=\"math_trig\">\n <value name=\"NUM\">\n <shadow type=\"math_number\">\n <field name=\"NUM\">45</field>\n </shadow>\n </value>\n </block>\n <block type=\"math_constant\"></block>\n <block type=\"math_number_property\">\n <value name=\"NUMBER_TO_CHECK\">\n <shadow type=\"math_number\">\n <field name=\"NUM\">0</field>\n </shadow>\n </value>\n </block>\n <block type=\"math_round\">\n <value name=\"NUM\">\n <shadow type=\"math_number\">\n <field name=\"NUM\">3.1</field>\n </shadow>\n </value>\n </block>\n <block type=\"math_on_list\"></block>\n <block type=\"math_modulo\">\n <value name=\"DIVIDEND\">\n <shadow type=\"math_number\">\n <field name=\"NUM\">64</field>\n </shadow>\n </value>\n <value name=\"DIVISOR\">\n <shadow type=\"math_number\">\n <field name=\"NUM\">10</field>\n </shadow>\n </value>\n </block>\n <block type=\"math_constrain\">\n <value name=\"VALUE\">\n <shadow type=\"math_number\">\n <field name=\"NUM\">50</field>\n </shadow>\n </value>\n <value name=\"LOW\">\n <shadow type=\"math_number\">\n <field name=\"NUM\">1</field>\n </shadow>\n </value>\n <value name=\"HIGH\">\n <shadow type=\"math_number\">\n <field name=\"NUM\">100</field>\n </shadow>\n </value>\n </block>\n <block type=\"math_random_int\">\n <value name=\"FROM\">\n <shadow type=\"math_number\">\n <field name=\"NUM\">1</field>\n </shadow>\n </value>\n <value name=\"TO\">\n <shadow type=\"math_number\">\n <field name=\"NUM\">100</field>\n </shadow>\n </value>\n </block>\n <block type=\"math_random_float\"></block>\n </category>\n <category name=\"Texto\" colour=\"%{BKY_TEXTS_HUE}\">\n <block type=\"text\"></block>\n <block type=\"text_join\"></block>\n <block type=\"text_append\">\n <value name=\"TEXT\">\n <shadow type=\"text\"></shadow>\n </value>\n </block>\n <block type=\"text_length\">\n <value name=\"VALUE\">\n <shadow type=\"text\">\n <field name=\"TEXT\">abc</field>\n </shadow>\n </value>\n </block>\n <block type=\"text_isEmpty\">\n <value name=\"VALUE\">\n <shadow type=\"text\">\n <field name=\"TEXT\"></field>\n </shadow>\n </value>\n </block>\n <block type=\"text_indexOf\">\n <value name=\"VALUE\">\n <block type=\"variables_get\">\n <field name=\"VAR\">{textVariable}</field>\n </block>\n </value>\n <value name=\"FIND\">\n <shadow type=\"text\">\n <field name=\"TEXT\">abc</field>\n </shadow>\n </value>\n </block>\n <block type=\"text_charAt\">\n <value name=\"VALUE\">\n <block type=\"variables_get\">\n <field name=\"VAR\">{textVariable}</field>\n </block>\n </value>\n </block>\n <block type=\"text_getSubstring\">\n <value name=\"STRING\">\n <block type=\"variables_get\">\n <field name=\"VAR\">{textVariable}</field>\n </block>\n </value>\n </block>\n <block type=\"text_changeCase\">\n <value name=\"TEXT\">\n <shadow type=\"text\">\n <field name=\"TEXT\">abc</field>\n </shadow>\n </value>\n </block>\n <block type=\"text_trim\">\n <value name=\"TEXT\">\n <shadow type=\"text\">\n <field name=\"TEXT\">abc</field>\n </shadow>\n </value>\n </block>\n <block type=\"text_print\">\n <value name=\"TEXT\">\n <shadow type=\"text\">\n <field name=\"TEXT\">abc</field>\n </shadow>\n </value>\n </block>\n <block type=\"text_prompt_ext\">\n <value name=\"TEXT\">\n <shadow type=\"text\">\n <field name=\"TEXT\">abc</field>\n </shadow>\n </value>\n </block>\n </category>\n <category name=\"Listas\" colour=\"%{BKY_LISTS_HUE}\">\n <block type=\"lists_create_with\">\n <mutation items=\"0\"></mutation>\n </block>\n <block type=\"lists_create_with\"></block>\n <block type=\"lists_repeat\">\n <value name=\"NUM\">\n <shadow type=\"math_number\">\n <field name=\"NUM\">5</field>\n </shadow>\n </value>\n </block>\n <block type=\"lists_length\"></block>\n <block type=\"lists_isEmpty\"></block>\n <block type=\"lists_indexOf\">\n <value name=\"VALUE\">\n <block type=\"variables_get\">\n <field name=\"VAR\">{listVariable}</field>\n </block>\n </value>\n </block>\n <block type=\"lists_getIndex\">\n <value name=\"VALUE\">\n <block type=\"variables_get\">\n <field name=\"VAR\">{listVariable}</field>\n </block>\n </value>\n </block>\n <block type=\"lists_setIndex\">\n <value name=\"LIST\">\n <block type=\"variables_get\">\n <field name=\"VAR\">{listVariable}</field>\n </block>\n </value>\n </block>\n <block type=\"lists_getSublist\">\n <value name=\"LIST\">\n <block type=\"variables_get\">\n <field name=\"VAR\">{listVariable}</field>\n </block>\n </value>\n </block>\n <block type=\"lists_split\">\n <value name=\"DELIM\">\n <shadow type=\"text\">\n <field name=\"TEXT\">,</field>\n </shadow>\n </value>\n </block>\n <block type=\"lists_sort\"></block>\n </category>\n <sep></sep>\n <category name=\"Variables\" colour=\"%{BKY_VARIABLES_HUE}\" custom=\"VARIABLE\"></category>\n <category name=\"Funciones\" colour=\"%{BKY_PROCEDURES_HUE}\" custom=\"PROCEDURE\"></category>\n <sep></sep>\n <category name=\"GPIO\" colour=\"210\">\n <block type=\"mpy_esp32_pin_mode_explicit\">\n <value name=\"pin_number\">\n <shadow type=\"math_number\">\n <field name=\"NUM\">0</field>\n </shadow>\n </value>\n </block>\n <block type=\"mpy_esp32_pin_read\"></block>\n <block type=\"mpy_esp32_pin_write\">\n <value name=\"pin_value\">\n <shadow type=\"math_number\">\n <field name=\"NUM\">0</field>\n </shadow>\n </value>\n </block>\n </category>\n <category id=\"timers\" name=\"Temporizadores\" colour=\"65\">\n <block type=\"mpy_sleep_s\">\n <value name=\"time\">\n <shadow type=\"math_number\">\n <field name=\"NUM\">1</field>\n </shadow>\n </value>\n </block>\n </category>\n <category id=\"adc\" name=\"ADC\" colour=\"120\">\n <block type=\"adc_minimal_class_explicit\">\n <value name=\"id_pin\">\n <shadow type=\"math_number\">\n <field name=\"NUM\">0</field>\n </shadow>\n </value>\n </block>\n <block type=\"adc_minimal_read\"></block>\n <block type=\"adc_atten_class\">\n <value name=\"id_pin\">\n <shadow type=\"math_number\">\n <field name=\"NUM\">0</field>\n </shadow>\n </value>\n </block>\n <block type=\"adc_resolution_select_read\"></block>\n </category>\n <category id=\"pwm\" name=\"PWM\" colour=\"290\">\n <block type=\"pwm_minimal_class\">\n <value name=\"pin_id\">\n <shadow type=\"math_number\">\n <field name=\"NUM\">0</field>\n </shadow>\n </value>\n </block>\n <block type=\"pwm_init_deinit\">\n </block>\n <block type=\"pwm_method_freq_duty\">\n <value name=\"argument_funtion\">\n <shadow type=\"math_number\">\n <field name=\"NUM\">0</field>\n </shadow>\n </value>\n </block>\n </category>\n <sep></sep>\n <category id=\"sensors\" name=\"Sensores\" colour=\"195\">\n <category id=\"dht\" name=\"DHT\" colour=\"195\">\n <block type=\"dht_init\">\n <value name=\"pin\">\n <shadow type=\"math_number\">\n <field name=\"NUM\">0</field>\n </shadow>\n </value>\n </block>\n <block type=\"dht_measure\"></block>\n <block type=\"dht_read\"></block>\n </category>\n </category>\n <sep></sep>\n</xml>\n";
|
|
18
|
+
/** Items a ser entregados al menubar de la aplicación Catalejo Editor */
|
|
19
|
+
declare function getItemsToolBarOfPlugin(lang: LANG): ({
|
|
20
|
+
label: string;
|
|
21
|
+
icon: string;
|
|
22
|
+
command: string;
|
|
23
|
+
items?: undefined;
|
|
24
|
+
} | {
|
|
25
|
+
label: string;
|
|
26
|
+
icon: string;
|
|
27
|
+
items: {
|
|
28
|
+
label: string;
|
|
29
|
+
icon: string;
|
|
30
|
+
command: string;
|
|
31
|
+
}[];
|
|
32
|
+
command?: undefined;
|
|
33
|
+
})[];
|
|
34
|
+
/** Filtro de solicitudes que provienen de la aplicación */
|
|
35
|
+
declare function commandEmit(project: Project, commandId: string, lang: LANG): Promise<PluginResult>;
|
|
36
|
+
export { platform, platformLang, toolbox, initBlockly, generateCode, getItemsToolBarOfPlugin, commandEmit, blockly_template, lang_template, };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './main'
|