Blocks Area
SerialPort
π‘ SerialPort – Your βDirect Chat with the PCβ.
What it is: Blocks that allow the robot to communicate with 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: βHello world!β
π It’s the direct chat between your robot and the PC.

π§© Fun Guide to SerialPort Blocks (Clu-blocks Pro)
π‘ Important! Serial blocks let your robot send and receive messages through wires β like chatting with your computer or another robot. Itβs how your robot says βHello!β or listens for commands.
| # | Block | What it does | Dropdown options | What the options mean |
|---|---|---|---|---|
| 1 | print "Clu-Bots" | Sends a message to the serial monitor | β | Prints text without a line break β good for short messages |
| 2 | println "Hello" "Clu-Bots" | Sends a message with a line break | β | Prints text and moves to the next line β great for clean logs |
| 3 | print "Clu-Bots" endsWith "Clu-Bots" | Checks if a message ends with a word | β | Useful for filtering or matching incoming messages |
| 4 | Receive string input: prompt | Asks the user to type something | β | Great for interactive programs β like entering a name or command |
| 5 | Serial uart1 RX# 2 TX# 3 baud rate 115200 | Sets up a serial connection | β | RX = receive pin, TX = transmit pin, baud rate = speed of communication |
| 6 | Serial uart1 print "Clu-Bots" | Sends a message through UART | β | Sends text to another device β like a second robot or sensor |
| 7 | Serial uart1 println "Clu-Bots" | Sends a message with a line break through UART | β | Same as above, but cleaner formatting |
| 8 | Serial uart1 println hex: 0xFF00FF | Sends a number in hex format | binary, octal, decimal, hex | Choose how the number looks β hex is great for colors or codes |
| 9 | Serial uart1 Read other mode tooltherMPdeviceData repeat yes | Reads data from another device repeatedly | β | Keeps listening for new info β great for sensors or modules |
| 10 | Serial uart1 ReadDataOtherMPDeviceData | Reads a chunk of data from another device | β | Use this to grab info like temperature, distance, or status |
| 11 | Serial uart1 write(byte) transfer.byte "Clu-Bots" | Sends raw byte data | β | Sends low-level info β great for advanced communication |
| 12 | Serial uart1 isAvailable? | Checks if new data has arrived | β | Returns true if thereβs something to read β like a message waiting |
| 13 | Serial uart1 Read a row | Reads a full line of incoming data | β | Useful for commands or sensor logs β reads until a line break |
π§ Quick Tips for Students
- Use print/println to send messages to your computer β great for debugging or chatting.
- Use RX/TX setup before sending or receiving β itβs like plugging in the walkie-talkie.
- Use hex/binary formats when working with colors, codes, or advanced devices.
- Use isAvailable + Read to listen for messages β like checking your inbox.