-
Notifications
You must be signed in to change notification settings - Fork 167
04 HDUART
Geo edited this page Jul 21, 2025
·
3 revisions
This mode enables half-duplex UART communication, where TX and RX share a single data line.
| Command | Description |
|---|---|
bridge |
Starts a half-duplex bridge session; input/output share a single pin |
config |
Configure pin, baud rate, data bits, parity, stop bits, and inversion |
[0x01 D:10 r:255] |
Execute custom instruction sequences using HDUART bytecode syntax |
- The
bridgecommand provides real-time communication. Press any ESP32 button to stop. -
configallows you to select the shared TX/RX pin and adjust UART parameters:- Baud rate
- Data bits (5–8)
- Parity (None, Even, Odd)
- Stop bits (1 or 2)
- Inverted logic if needed
- HDUART instructions (
[0x... D:N r:N]) give full control over transmitted bytes, delays, and response length. - Since TX and RX share the same line, timing and collisions must be managed carefully.
mode hduart
config # Select pin, baud, data bits, etc.
bridge # Start interactive session
[0x01 D:10 r:255] # Send 0x01, wait 10ms, read 255 bytes
⚠️ Voltage Warning: Devices should only operate at 3.3V or 5V.
Do not connect peripherals using other voltage levels — doing so may damage your ESP32.