\begin{figure}[ht] \centering \begin{tikzpicture}[ process/.style={rectangle, draw,…
- User
\begin{figure}[ht] \centering \begin{tikzpicture}[ process/.style={rectangle, draw, minimum height=0.7cm, minimum width=2.2cm, align=center, fill=yellow!10, font=\footnotesize}, decision/.style={diamond, draw, minimum height=0.7cm, minimum width=1.8cm, align=center, fill=red!10, font=\footnotesize}, startend/.style={ellipse, draw, minimum height=0.7cm, minimum width=1.8cm, align=center, fill=green!10, font=\footnotesize}, arrow/.style={-Stealth, thick}, node distance=1.2cm and 0.8cm, scale=0.85, transform shape ]
% Nodes \node[startend] (start) {Start}; \node[process, below=of start] (sensors) {Read Sensors}; \node[process, below=of sensors] (json) {Create JSON}; \node[process, below=of json] (serial) {Send to ESP32}; \node[decision, below=of serial] (wifi) {WiFi Connected?}; \node[process, below=of wifi] (post) {POST to Flask}; \node[process, below=of post] (predict) {LSTM Prediction}; \node[process, below=of predict] (log) {Log to CSV}; \node[process, below=of log] (display) {Update OLED}; \node[decision, below=of display] (risk) {Risk Level?}; \node[process, below=of risk, xshift=-2.5cm] (low) {Green LED\Servo 0\degree}; \node[process, below=of risk] (mod) {Yellow LED\Buzzer\Servo 45\degree}; \node[process, below=of risk, xshift=2.5cm] (high) {Red LED\Buzzer\Servo 90\degree}; \node[process, below=of mod] (delay) {Delay 3s}; \node[startend, below=of delay] (loop) {Loop};
% Arrows \draw[arrow] (start) -- (sensors); \draw[arrow] (sensors) -- (json); \draw[arrow] (json) -- (serial); \draw[arrow] (serial) -- (wifi); \draw[arrow] (wifi) -- node[right, font=\tiny] {Yes} (post); \draw[arrow] (wifi) -| node[above, font=\tiny] {No} ++(-2.5,0) |- (delay); \draw[arrow] (post) -- (predict); \draw[arrow] (predict) -- (log); \draw[arrow] (log) -- (display); \draw[arrow] (display) -- (risk); \draw[arrow] (risk) -| (low) node[above, font=\tiny, xshift=-0.8cm] {LOW}; \draw[arrow] (risk) -- (mod) node[above, font=\tiny] {MOD}; \draw[arrow] (risk) -| (high) node[above, font=\tiny, xshift=0.8cm] {HIGH}; \draw[arrow] (low) |- (delay); \draw[arrow] (mod) -- (delay); \draw[arrow] (high) |- (delay); \draw[arrow] (delay) -- (loop); \draw[arrow] (loop) -| ++(3.5,0) |- (sensors);
\end{tikzpicture} \caption{Flow Chart of Flood Risk Prediction System} \label{fig:flowchart} \end{figure}
convert this horizontally into multiple rows and make sure that no line or nodes cross each others
Assistant
Here is a horizontal, multi-row version of your flowchart with no crossing lines or nodes. The flow is now left-to-right, split into three rows, and uses clean routing with orthogonal lines.
✅ Key Design Choices:
- Row 1: Sensor → JSON → Serial → WiFi Check
- Row 2: POST → LSTM → Log → OLED → Risk Check
- Row 3: Risk Actions → Delay → Loop (back to Row 1)
- No overlaps or crossings
- Orthogonal routing with
|-and-|for clarity
✅ LaTeX Code (Horizontal, Multi-Row)
\begin{figure}[ht] \centering \begin{tikzpicture}[ process/.style={rectangle, draw, minimum height=0.7cm, minimum width=2.2cm, align=center, fill=yellow!10, font=\footnotesize}, decision/.style={diamond, draw, minimum height=0.7cm, minimum width=1.8cm, align=center, fill=red!10, font=\footnotesize}, startend/.style={ellipse, draw, minimum height=0.7cm, minimum width=1.8cm, align=center, fill=green!10, font=\footnotesize}, arrow/.style={-Stealth, thick}, node distance=1.5cm and 2.2cm, scale=0.85, transform shape ] % Row 1 \node[startend] (start) {Start}; \node[process, right=of start] (sensors) {Read Sensors}; \node[process, right=of sensors] (json) {Create JSON}; \node[process, right=of json] (serial) {Send to ESP32}; \node[decision, right=of serial] (wifi) {WiFi Connected?}; % Row 2 \node[process, below=of wifi] (post) {POST to Flask}; \node[process, left=of post] (predict) {LSTM Prediction}; \node[process, left=of predict] (log) {Log to CSV}; \node[process, left=of log] (display) {Update OLED}; \node[decision, left=of display] (risk) {Risk Level?}; % Row 3 \node[process, below=of risk, xshift=-2.5cm] (low) {Green LED\\Servo 0°}; \node[process, below=of risk] (mod) {Yellow LED\\Buzzer\\Servo 45°}; \node[process, below=of risk, xshift=2.5cm] (high) {Red LED\\Buzzer\\Servo 90°}; \node[process, below=of mod] (delay) {Delay 3s}; \node[startend, left=of delay] (loop) {Loop}; % Arrows \draw[arrow] (start) -- (sensors); \draw[arrow] (sensors) -- (json); \draw[arrow] (json) -- (serial); \draw[arrow] (serial) -- (wifi); \draw[arrow] (wifi) -- node[above, font=\tiny] {Yes} (post); \draw[arrow] (wifi.south) -- ++(0,-0.5) -| ++(-6,-1) |- (delay); \draw[arrow] (post) -- (predict); \draw[arrow] (predict) -- (log); \draw[arrow] (log) -- (display); \draw[arrow] (display) -- (risk); \draw[arrow] (risk) -| (low) node[above, font=\tiny, xshift=-0.8cm] {LOW}; \draw[arrow] (risk) -- (mod) node[above, font=\tiny] {MOD}; \draw[arrow] (risk) -| (high) node[above, font=\tiny, xshift=0.8cm] {HIGH}; \draw[arrow] (low) |- (delay); \draw[arrow] (mod) -- (delay); \draw[arrow] (high) |- (delay); \draw[arrow] (delay) -- (loop); \draw[arrow] (loop) |- (sensors); \end{tikzpicture} \caption{Horizontal Flow Chart of Flood Risk Prediction System} \label{fig:flowchart-horizontal} \end{figure}
✅ Output Preview (Conceptual)
[Start] → [Read Sensors] → [Create JSON] → [Send to ESP32] → [WiFi?] ↓Yes [Loop] ← [Delay 3s] ← [Risk Actions] ← [Risk Level?] ← [Update OLED] ← [Log CSV] ← [LSTM] ← [POST Flask]
Let me know if you want a landscape PDF version or SVG export for slides or documentation.
Other models, same or similar prompt
Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.