• Thank you Gordon!

    Blockly.JavaScript.robot_move_angle = function () {
        var dir = Blockly.JavaScript.valueToCode(this, 'dir', Blockly.JavaScript.ORDER_ASSIGNMENT) || '""';
        var vel = Blockly.JavaScript.valueToCode(this, 'vel', Blockly.JavaScript.ORDER_ASSIGNMENT) || '""';
        var angle = Blockly.JavaScript.valueToCode(this, 'angle', Blockly.JavaScript.ORDER_ASSIGNMENT) || '""';
        var time = Blockly.JavaScript.valueToCode(this, 'time', Blockly.JavaScript.ORDER_ASSIGNMENT) || '""';
        return "robot_move_angle("+dir+","+vel+","+angle+","+time+","+"setTimeout("+MAGIC_CALLBACK_CODE+", 1000*"+time+")\n;"
    }
    

    I wrote my code like this, and I know that NEXT_BLOCK works well.
    But it has an error.
    error said :
    You have more open brackets than close brackets. Please see the hints in the Editor window

    But I changed front-end for my project, so I can't use editor window.
    So I want to see codes when I push upload button at my terminal.

    /upload.html

      function sendUploadedCode() {
        Espruino.Core.MenuPortSelector.ensureConnected(function() {
          Espruino.callProcessor("sending");
          Espruino.callProcessor("transformForEspruino", uploadCode, function(code) {
            Espruino.Core.CodeWriter.writeToEspruino(code, function() {
              Espruino.Core.Terminal.typeCharacters(code);
              Espruino.Core.Terminal.addNotification("Uploaded!");
            });
          });
        });
      }
    

    I know upload button use this function, so I add one line,

    Espruino.Core.Terminal.typeCharacters(code);
    

    But it doesn't work. Is it possible to see uploaded codes at web ide's terminal??

About

Avatar for user110706 @user110706 started