Waiting for incoming strings #4122
Replies: 1 comment
-
Posted at 2014-09-26 by @gfwilliams I'm not sure I understand... You want to program something to run inside the IDE itself? Posted at 2014-09-26 by tobor Sorry, looking for a block, something like GET string from CONSOLE Posted at 2014-09-26 by @gfwilliams Ahh, I see what you mean. I'm afraid not... Someone asked about this a while back, and I posted some code that could be used - however you'd have to modify the Web IDE to add a block: http://forum.espruino.com/conversations/1536/#comment26339 Posted at 2014-09-26 by JumJum Take a look to the testing plugin for WebIDE. Posted at 2014-09-26 by tobor My using the console as an example may have confused things. What I am trying to do is poll a sensor that returns a string on one of the serial ports of the discovery board. I would need to add blocks for serial and spi ports? Posted at 2014-09-29 by @gfwilliams Hi - yes, you'd have to add blocks for the other peripherals. I'm afraid that could end up being quite a lot of work. Having said that, last week I added a special block (only on the GitHub version of the Web IDE at the moment) that lets you write arbitrary JavaScript. As long as you don't have spaces in your variable names, you can access graphical variables and functions from the JavaScript block. Posted at 2014-09-29 by tobor I saw the comment 'Added 'code' block for blockly that'll let you execute your own block… ', could you give a brief example or how to get started with this? Posted at 2014-09-29 by tobor Nevermind, worked it out. Cool stuff. |
Beta Was this translation helpful? Give feedback.
-
Posted at 2014-09-26 by tobor
Is there a graphical module in the Web IDE for waiting for string from a serial or console port?
Beta Was this translation helpful? Give feedback.
All reactions