You are reading a single comment by @allObjects and its replies. Click here to read the full conversation.
  • @kolonuk, be aware of when using blockly, you cannot easily see what javascript is created on upload... therefore, blockly is not that much of help if you do not 'hack'/sniff the upload communication. In order to see what javascript has been uploaded to the board, you recall the second to last command in the console. (Regarding messing with and breaking our wife's PC: if you stick with a sandbox (see cog-whel setup - Project, where you can define a folder where all your things go), you cannot do real harm to the PC, and your stuff just stays in the sandbox).

    To see the uplaoded javascript, create - for example - the image-attached blockly code, upload it, then click into the console pane, and press twice the up-arrow button. This will recall into command mode the command sent for the upload, which is the uploaded code itself. NOTE: If you have more than one blockly block, you have to press the up-arrow button for each additional block. Espruino uploads them one by one in a command.

    @Gordon, I'm thinking about providing an option in 'blockly save' to save also/alternative as javascript code. (At the moment though, I'm on some other priorities and a bit short on time to have Espruino fun and explore the IDE code to add this... |:(... If you see this simply done, to run the upload-conversion part and save it into a same named, .js-suffixed file as the blockly code on blockly save, that would be very helpful for users in the same boat as @kolonuk.) - PS: Now also got to know what blockly's default is for the setWatch()-options object... ;-)

    ...for legibility witouth having to open the image separately, I added both 'sides' as own shots... and the code (with some formatting and fixes of missing semicolon 'error' WebIDE messages...).


    3 Attachments

    • blocklyGeneratedAndUploadedJS.png
    • BlocklySource.png
    • JavascriptFromBlocklySource.png

Avatar for allObjects @allObjects started