Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- \begin{tikzpicture}[node distance = 2cm]
- \draw node[start] (start) at (0, 0) {}
- node[block, below of = start] (off) {\small{Off}}
- node[block, below of = off] (idle) {\small{Idle}}
- node[block, below of = idle] (light) {\small{Check light level}}
- node[block, below of = light] (temp) {\small{Check temperature}}
- node[block, below of = temp] (vision) {\small{Check vision system}}
- node[block, left of = light, node distance = 4cm] (light-a) {\small{Turning on lights}}
- node[block, node distance = 3cm] (temp-a) at ([xshift=3cm, yshift=1cm] temp.45) {\small{Turning on heater}}
- node[block, node distance = 3cm] (temp-b) at ([xshift=3cm, yshift=-1cm] temp.315) {\small{Turning on fan}}
- node[block, left of = vision, node distance = 3.5cm] (water) {\small{Watering}}
- node[draw = none, below of = water] (spacer) {\tiny{All clear / watering done}}
- node[draw = none, left of = light-a] (spacer2) {}
- node[draw = none, right of = temp-b, node distance = 3cm] (spacer3) {\tiny{Done heating / cooling}};
- \draw[|->, shorten >= 2pt, shorten <= 2pt] (start) -- (off);
- \draw[|->, shorten >= 2pt, shorten <= 2pt] (off) -- (idle) node[midway, fill = white] {\tiny{Turn on}};
- \draw[|->, shorten >= 2pt, shorten <= 2pt] (idle) -- (light) node[midway, fill = white] {\tiny{Interval timer}};
- \draw[|->, shorten >= 2pt, shorten <= 2pt] (light) -- (temp) node[midway, fill = white] {\tiny{All clear}};
- \draw[|->, shorten >= 2pt, shorten <= 2pt] (temp) -- (vision) node[midway, fill = white] {\tiny{All clear}};
- \draw[|-, shorten >= 2pt, shorten <= 2pt] (vision) |- (spacer);
- \draw[->, shorten >= 2pt, shorten <= 2pt] (spacer) -| (spacer2) |- (idle);
- \draw[|->, shorten >= 2pt, shorten <= 2pt] (light) -- (light-a) node[midway, fill = white, above = 1em] {\tiny{Below threshold}};
- \draw[|->, shorten >= 2pt, shorten <= 2pt] (temp.15) -| (temp-a) node[midway, fill = white] {\tiny{Below threshold}};
- \draw[|->, shorten >= 2pt, shorten <= 2pt] (temp.345) -| (temp-b) node[midway, fill = white] {\tiny{Above threshold}};
- \draw[|->, shorten >= 2pt, shorten <= 2pt] (vision) -- (water) node[midway, fill = white, above = 1em] {\tiny{Suboptimal watering}};
- \draw[|-, shorten >= 2pt, shorten <= 2pt] (temp-a) -| (spacer3);
- \draw[->, shorten >= 2pt, shorten <= 2pt] (spacer3) |- (vision.345);
- \draw[|-, shorten >= 2pt, shorten <= 2pt] (temp-b) -- (spacer3);
- \draw[|->, shorten >= 2pt, shorten <= 2pt] (light-a) |- (temp) node[midway, fill = white] {\tiny{Done lighting}};
- \draw[|-, shorten >= 2pt, shorten <= 2pt] (water) -- (spacer);
- \end{tikzpicture}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement