Shop OBEX P1 Docs P2 Docs Learn Events
BlocklyProp and ActivityBoard - Terminal Input — Parallax Forums

BlocklyProp and ActivityBoard - Terminal Input

For the blocks:
Communicate/Terminal/TerminalReceiveTextStoreIn
Communicate/Terminal/TerminalReceiveNumberStoreIn

I don't see on the terminal (window titled "Console") an interface to enter text.

Any thoughts?

- Thanks.

Comments

  • Hey John! Right, and we've noted the same in a GitHub issue somewhere for BlocklyProp. The idea is to create a receive pane to enter the text.

    I have a thought from a prior discussion that you can actually type text into the transmit window and receive it on the Propeller Activity Board. I haven't been able to try this but I think it actually works. Maybe you can let us know.

    Ken Gracey
  • Your thought is correct. Just click anywhere in the black background and cursor will illuminate and accept input until the enter key is struck. Cursor stays active as long as terminal window is running, no need to re-click.

    http://blockly.parallax.com/blockly/projectlink?id=1325&key=39d6f9c4-3aa0-4864-9950-89fb2a36ba86


    Enter String:
    Worked
    Entering an escape did not work e.g. entry of abc\tdef was displayed as abc\tdef
    Accepted and returned double quotes

    Enter Int:
    Worked
    (no additional observations)

    Enter Float:
    Worked
    Truncated to int when displayed. This might have to do with creating float vars and nothing to do with terminal, I'm looking into it.
  • Yes, the terminal is still has a few issues, but getting it completely fixed is not as high priority as a few other things, so it may stay in its current form for a while. As far as I know, escaped chars are not allowed.

    We chose not to support floats in Blockly because it would have required a lot of casting behind the scenes, and it would have made impossibly complex decision trees in the code generators beyond what any of us felt comfortable doing - to the point where the generated code was unreliable at best. Blocky will truncate anything float to an int. Our suggestion there is to simply multiply by powers of 10 up to the precision that you need - similar to how you would have to do math on the BS2.
  • Terminal as-is is fine for our projects, just need to know the trick.

    No float is fine for our projects and, as you said, not hard to work around. I'm just glad to know that is the capability and not a mistake on my part.

Sign In or Register to comment.