feat: sync arduino source board configurations
This commit is contained in:
41
mixly/boards/default_src/arduino_esp8266/blocks/ethernet.js
Normal file
41
mixly/boards/default_src/arduino_esp8266/blocks/ethernet.js
Normal file
@@ -0,0 +1,41 @@
|
||||
import * as Blockly from 'blockly/core';
|
||||
|
||||
const ETHERNET_HUE = 0;
|
||||
|
||||
//esp_now
|
||||
export const esp_now_send = {
|
||||
init: function () {
|
||||
this.appendDummyInput()
|
||||
.appendField("ESP NOW" + Blockly.Msg.MIXLY_MICROPYTHON_SOCKET_SEND);
|
||||
this.appendValueInput("mac")
|
||||
.setCheck(null)
|
||||
.appendField(Blockly.Msg.MIXLY_ETHERNET_MAC_ADDRESS);
|
||||
this.appendValueInput("data")
|
||||
.setCheck(null)
|
||||
.appendField(Blockly.Msg.MIXLY_SD_DATA);
|
||||
this.appendStatementInput("success")
|
||||
.setCheck(null)
|
||||
.appendField(Blockly.Msg.MIXLY_MICROPYTHON_SOCKET_SEND + Blockly.Msg.MIXLY_SUCCESS);
|
||||
this.appendStatementInput("failure")
|
||||
.setCheck(null)
|
||||
.appendField(Blockly.Msg.MIXLY_MICROPYTHON_SOCKET_SEND + Blockly.Msg.MIXLY_FAILED);
|
||||
this.setPreviousStatement(true, null);
|
||||
this.setNextStatement(true, null);
|
||||
this.setColour(ETHERNET_HUE);
|
||||
this.setTooltip("");
|
||||
this.setHelpUrl("https://randomnerdtutorials.com/esp-now-esp32-arduino-ide/");
|
||||
}
|
||||
};
|
||||
|
||||
//esp_now
|
||||
export const esp_now_receive = {
|
||||
init: function () {
|
||||
this.appendDummyInput()
|
||||
.appendField("ESP NOW" + Blockly.Msg.MQTT_subscribe2 + Blockly.Msg.MIXLY_SD_DATA);
|
||||
this.appendStatementInput("receive_data")
|
||||
.setCheck(null);
|
||||
this.setColour(ETHERNET_HUE);
|
||||
this.setTooltip("");
|
||||
this.setHelpUrl("https://randomnerdtutorials.com/esp-now-esp32-arduino-ide/");
|
||||
}
|
||||
};
|
||||
23
mixly/boards/default_src/arduino_esp8266/blocks/pinout.js
Normal file
23
mixly/boards/default_src/arduino_esp8266/blocks/pinout.js
Normal file
@@ -0,0 +1,23 @@
|
||||
import * as Blockly from 'blockly/core';
|
||||
|
||||
const PINOUT_HUE = '#555555';
|
||||
|
||||
export const esp8266_pin = {
|
||||
init: function () {
|
||||
this.appendDummyInput()
|
||||
.appendField(new Blockly.FieldImage(require('../media/boards/NodeMCU.png'), 510, 346, '*'));
|
||||
this.setColour(PINOUT_HUE);
|
||||
this.setTooltip();
|
||||
this.setHelpUrl();
|
||||
}
|
||||
};
|
||||
|
||||
export const wemos_d1_mini_pin = {
|
||||
init: function () {
|
||||
this.appendDummyInput()
|
||||
.appendField(new Blockly.FieldImage(require('../media/boards/WeMosD1Mini.png'), 510, 264, '*'));
|
||||
this.setColour(PINOUT_HUE);
|
||||
this.setTooltip();
|
||||
this.setHelpUrl();
|
||||
}
|
||||
};
|
||||
Reference in New Issue
Block a user