Arduino UNO Q RS232
Use RS232 serial communication with the Arduino UNO Q and a TTL-to-RS232 module. The MCU communicates over SoftwareSerial, the module converts TTL signals to RS232 voltage levels for long-distance serial communication. With Bridge and Telegram, you can send and receive RS232 data remotely from Python or your phone.
In this tutorial, you will learn:
- How RS232 communication works and why a TTL-to-RS232 module is needed
- How to wire the TTL-to-RS232 module to the Arduino UNO Q
- How to send and receive data over RS232 on Arduino UNO Q
- How to use Bridge to control RS232 communication from Python on Arduino UNO Q
- How to send and receive RS232 data via Telegram on Arduino UNO Q
- How to use OpenClaw on Arduino UNO Q with RS232

Hardware Preparation
Or you can buy the following kits:
| 1 | × | DIYables Sensor Kit (18 sensors/displays) |
Additionally, some of these links are for products from our own brand, DIYables .
Overview of the TTL to RS232 Module
The Arduino UNO Q MCU communicates over UART using TTL logic levels (3.3V). TTL signals travel only short distances. To communicate over longer distances with RS232-compatible devices (PLCs, older computers, industrial equipment), you need to convert the TTL signal to RS232 voltage levels (typically ±12V). The TTL-to-RS232 module performs this conversion in both directions.

Pinout
- TTL interface (connects to Arduino UNO Q MCU):
- VCC: Power input — connect to 3.3V
- GND: Ground
- RXD: Data input — connect to MCU TX pin (D6)
- TXD: Data output — connect to MCU RX pin (D7)
- RS232 interface: DB9 female D-Sub connector — connect to your RS232 device
Wiring Diagram

This image is created using Fritzing. Click to enlarge image
| TTL-to-RS232 Module Pin | Arduino UNO Q MCU Pin | Note |
|---|---|---|
| VCC | 3.3V | |
| GND | GND | |
| RXD | D6 (MCU TX) | |
| TXD | D7 (MCU RX) |
Connect the DB9 connector to your RS232 device or RS232-to-USB cable.
How To Program For RS232
- Include SoftwareSerial and create an RS232 serial object:
- Read incoming RS232 data:
- Send data over RS232:
Arduino UNO Q Code
Detailed Instructions
First time with Arduino UNO Q? Follow the Getting Started with Arduino UNO Q tutorial before proceeding.
- Connect: Wire the TTL-to-RS232 module to the Arduino UNO Q MCU as shown in the wiring diagram.
- Open Arduino App Lab: Launch Arduino App Lab and wait until it detects your Arduino UNO Q.
- Create a new App: Click the Create New App button.

- Give the App a name, for example: RS232
- Click Create to confirm.

- Paste the sketch: Copy the MCU code above and paste it into sketch/sketch.ino.
- Upload: Click the Run button in Arduino App Lab.

Testing
To test RS232 communication:
- Connect the DB9 port of the module to your PC using an RS232-to-USB cable:

- Set the baud rate to 9600, select the correct COM port.
- Type any text and send it. The Arduino UNO Q will echo it back — you should see the echoed data in the terminal.
Bridge: Linux + MCU
This section shows how to send and receive RS232 data from the Linux side (Python) via Bridge:
- The TTL-to-RS232 module is connected to the MCU via SoftwareSerial — the MCU handles all serial I/O
- The MPU cannot use SoftwareSerial directly — it calls Bridge functions to send/receive RS232 data
- The MPU has Wi-Fi — running full Debian Linux, it can relay RS232 data to Telegram or web services
- Arduino_RouterBridge enables RPC communication between the two processors
- ⚠️ /dev/ttyHS1 (Linux) and Serial1 (MCU) are RESERVED by the router — never open them in user code
MCU Code (Bridge)
Python Code (Bridge)
Detailed Instructions
- Connect: Wire the TTL-to-RS232 module to the Arduino UNO Q as shown above.
- Open Arduino App Lab and create a new App named RS232Bridge.
- Paste the MCU sketch into sketch/sketch.ino.
- Paste the Python code into the Python file.
- Install the library: Click the Add sketch library button (the open book icon with a + sign) in the left sidebar.

- Search for Arduino_RouterBridge created by Arduino and click the Install button.
- Upload: Click the Run button. Python will send a message via RS232 and read back any echoed data.

App Lab Console Output
Telegram
Send and receive RS232 data through Telegram — forward messages from industrial devices to your phone or send commands from Telegram to an RS232 device.
MCU sketch: Keep the same MCU sketch from the previous Bridge section.
Python Code (Telegram)
Detailed Instructions
- Replace YOUR_TELEGRAM_BOT_TOKEN with your actual bot token from BotFather.
- Replace YOUR_CHAT_ID with your Telegram chat ID.
- Paste the Python code into your App's Python file (keep the same MCU sketch).
- Click the Run button — send /send Hello in Telegram to transmit data over RS232.
App Lab Console Output
ArduinoBot
OpenClaw
...OPENCLAW
OpenClaw support for Arduino UNO Q RS232 is coming soon.
...OPENCLAW
Project Ideas
You can build many useful projects with RS232 communication and Arduino UNO Q:
- Industrial PLC Gateway: Connect the Arduino UNO Q to a PLC or industrial controller via RS232; Python forwards received status messages to Telegram so you can monitor factory equipment from your phone
- Barcode Scanner Integration: Connect an RS232 barcode scanner to the TTL-to-RS232 module; when a barcode is scanned, the MCU reads the data via SoftwareSerial and Python sends it to Telegram for logging
- Legacy Serial Printer Control: Send print commands from Telegram through Bridge to the MCU, which forwards them over RS232 to a legacy serial printer or display terminal — bridging modern wireless control with older serial hardware
- GPS with RS232 Output: Connect an RS232-output GPS receiver to the module; the MCU reads NMEA sentences, Python parses the data, and Telegram sends location updates on demand
- Remote Serial Diagnostics: Forward RS232 debug output from an embedded device to Telegram via Bridge — useful for monitoring remote devices without needing physical access to a serial terminal
Challenge Yourself
Ready to go further with RS232 on Arduino UNO Q? Try these challenges:
- Easy: Modify the MCU sketch to accumulate received bytes until a newline character is detected, then expose the complete line as a single string via get_received — preventing partial reads when data arrives in chunks.
- Medium: Build a bidirectional relay: Python reads temperature from a sensor Bridge function and formats a status string, sends it via send_rs232 every 30 seconds, and simultaneously reads any RS232 responses with get_received — forwarding them as Telegram notifications.
- Advanced: Implement a message queue: Python maintains a list of outgoing RS232 messages, sends them one per second via send_rs232, and collects all responses with get_received; after each batch, it sends a Telegram summary showing how many messages were sent and what responses were received.