Skip to content
Discussion options

You must be logged in to vote

Yeah, mermaid’s layout is a bit of a black box, especially on GitHub, so small tweaks to direction are basically your main lever.

Try this: I put the whole diagram left‑to‑right, but inside each UART box I switch to top‑to‑bottom. That makes Tx and Rx stack vertically inside each UART. Then I draw the crossed lines (Tx1 → Rx2 and Tx2 → Rx1) and connect each UART to its data bus.

flowchart LR
  subgraph uart1 [UART 1]
    direction TB
    Tx1
    Rx1
  end

  subgraph uart2 [UART 2]
    direction TB
    Tx2
    Rx2
  end

  Tx1 -->|Tx1 to Rx2| Rx2
  Tx2 -->|Tx2 to Rx1| Rx1
  DB1[Data Bus 1] <--> uart1
  DB2[Data Bus 2] <--> uart2
Loading

Replies: 3 comments 5 replies

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
5 replies
@iampi31415
Comment options

@iampi31415
Comment options

@chrislyons-dev
Comment options

@chrislyons-dev
Comment options

Answer selected by iampi31415
@iampi31415
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants