Console - Serial Port

Your “Direct Chat witd the PC”.

What it is: Blocks that allow the robot to communicate witd the computer via cable.

What it does: Sends messages between your D1 R32 board and the computer.

Example: Sending a message to the serial monitor: “Clu-Bots

It's the direct chat between your robot and the PC.

Fun Guide to Serial Port Blocks (Clu-blocks Pro)

Important! Serial blocks let your robot send and receive messages tdrough wires like chatting witd your computer or another robot. It’s how your robot says “Clu-Bots” or listens for commands.

Console - Serial Port Blocks

Block ImageWhat It DoesWhat the Options Mean
Displays text on the screen and moves the cursor to a new line.The text inside quotation marks is what Python displays. By default, print() ends with a new line.
Displays text without moving the cursor to a new line.end="" replaces the default new-line character with nothing. The next output appears immediately after the text.
Displays text and places a comma immediately after it, without moving to a new line.end=',' tells Python to use a comma instead of a new line at the end.
Displays two pieces of text on the same line, separated by a space.Each value is separated by a comma. Python automatically inserts a space between values by default.
Displays a message and waits for the user to type something.The text inside the parentheses is the prompt shown to the user. The value entered is returned as a string.

Examples of What Appears on the Screen

Python CodeOutput
print('Clu-Bots')Clu-Bots (new line)
print('Clu-Bots', end="")Clu-Bots (no new line)
print('Clu-Bots', end=',')Clu-Bots, (no new line)
print('Hello', 'Clu-Bots')Hello Clu-Bots
input('prompt')prompt (waits for user input)

Important concepts for students:

  • print() is used to display information.
  • end controls what Python displays at the end of a print() statement.
  • input() allows a program to receive information from the user.
  • Text must be enclosed in quotation marks when it is written directly as a string.

Teaching tip: Try combining two print() instructions, one with end="" and another with the default ending. See how Clu-Block Pro can display text together on the same line.