Terminal

BlocklyProp reference for TERMINAL blocks

Available for all board types via a USB connection. Not currently available over WiFi with the Activity Board WX or Badge WX.

The TERMINAL blocks are used for displaying text on your computer screen, using BlocklyProp's built-in Terminal. The Terminal will open automatically when you run a project that uses these blocks.

Do not try to use Terminal and Graph blocks in the same project. The Terminal takes charge and will prevent the Graphing window from opening. You may, however, see some data values appear in the Terminal window.
Do not use the Graph blocks in a function that will be launched with the New Processor block.  It won't work - the Graph needs to be used from your project's main processor.


Terminal print text

The Terminal print text block is used to send text to the Terminal window. When checked, the "then a new line” checkbox adds a carriage return to the end of the text that was sent, moving the cursor to the beginning of the next line in the Terminal.  (Note: earlier versions of this block omitted the quotation marks around the text string.)


Terminal print number

The Terminal print number block sends the inserted value to the Terminal window. Set the drop-down menu to display the number as a decimal, hexadecimal, or binary. The “then a new line” checkbox, when checked, adds a carriage return to the end of the number that was sent, moving the cursor to the beginning of the next line in the Terminal.


Terminal print multiple

The Terminal print multiple block can print several terms of different types on a single line.  When checked, the "then a new line” checkbox adds a carriage return to the end of the text that was sent, moving the cursor to the beginning of the next line in the Terminal. 

Click the gear icon to drag additional terms into the list. Checking the "specify digits" box adds an optional field to all numeric values. Then attach appropriate values to the block, and optionally specify how many digits to display for each numerical value.  Options are:

  • text
  • decimal number
  • hexadecimal number
  • binary number
  • floating point number
  • ASCII character

Floating point number option

BlocklyProp uses integer numbers. The floating point number option allows an integer value to be displayed as a decimal number.  Use its drop-down menu to divide the integer by a multiple of 10 to scale and display the number appropriately.


Terminal receive text

The Terminal receive text block stores any characters typed into the Terminal into the variable item chosen in the drop-down menu. The characters entered, even if they are numbers, are stored as a string. This block will continue to collect up to 128 characters until the user presses the enter key (sends a carriage return character). Program execution will pause until the carriage return character is received.


Terminal receive number

The Terminal receive number block stores numerical characters typed into the Terminal into the variable item chosen in the drop-down. The number entered is stored as an integer. This block will continue to collect numerical characters until the user presses the enter key (sends a carriage return character).  Program execution will pause until the carriage return character is received.


Terminal new line

The Terminal new line block sends a single carriage return character to the Terminal, moving the cursor to the beginning of the next line.


Terminal clear screen

The Terminal clear screen block sends a special character to the screen, which causes the Terminal to clear and reset the cursor to the top left (0,0) position.


Terminal set cursor

The Terminal set cursor block positions the cursor in the window.

  • First, use a Terminal clear screen block, which also places the cursor in the top-left 0, 0 positions.
  • Insert a number value to the desired row.
  • Insert a number value to the desired column, 0 to 255.

Terminal close

The Terminal close block closes the Simple Terminal object so that pins 30 and 31 can be used for other purposes such as a full-duplex serial connection.