0

flow-chart

I'm trying to make this flow-chart, this is my code:

I've modify a bit my code:

\begin{tikzpicture}[node distance=2cm, auto]
\tikzstyle{decision} = [diamond, text width=5.9em, text centered, draw=black, fill=blue!20, node distance=4cm]

\tikzstyle{startstop} = [rectangle, text width=7em, rounded corners, minimum height=1cm,text centered, draw=black, fill=white!20, node distance=3cm]

\tikzstyle{process} = [rectangle, text width=6em, text centered, draw=black, fill=white!20, node distance=3cm]

\tikzstyle{line} = [draw, -latex']

\centering
\node [startstop] (inizializza) {INIZIALIZZA MICRO};
\node [process, below of=inizializza] (identifica) {LEGGI PORTA DI INGRESSO};
\node [decision, below of=identifica] (decidi) {PULSANTE PREMUTO?};
\node [process, right of=decidi, node distance=4.5cm] (accendi) {ACCENDI LED};
\path [line] (inizializza) -- (identifica);
\path [line] (identifica) -- (decidi);
\path [line] (decidi) -- node {Si} (accendi);
\path [line] (decidi.south)  |- node[near start] {No} (0cm,-9.3)  -| (-2cm,-1.5)  -| (accendi);

\end{tikzpicture}

but still no clue to add black dot and other small arrows in lines

I've to problem to make the arrow go south, left north, and back to "accendi led", and i dunno how to insert that small arrow in lines and the black dot.

tommy
  • 3

1 Answers1

0

New Answer:

\documentclass{article}
\usepackage{tikz}
\usetikzlibrary{arrows,shapes,decorations.markings}

\begin{document}

\begin{tikzpicture}[node distance=2cm, auto]
\tikzstyle{decision} = [diamond, text width=5.9em, text centered, draw=black, fill=blue!20, node distance=4cm]

\tikzstyle{startstop} = [rectangle, text width=7em, rounded corners, minimum height=1cm,text centered, draw=black, fill=white!20, node distance=3cm]

\tikzstyle{process} = [rectangle, text width=6em, text centered, draw=black, fill=white!20, node distance=3cm]

\tikzstyle{line} = [draw, -latex']

\centering
\node [startstop] (inizializza) {INIZIALIZZA MICRO};
\node [process, below of=inizializza] (identifica) {LEGGI PORTA DI INGRESSO};
\node [decision, below of=identifica] (decidi) {PULSANTE PREMUTO?};
\node [process, right of=decidi, node distance=4.5cm] (accendi) {ACCENDI LED};
\begin{scope}[thick,decoration={
    markings,
    mark=at position 0.5 with {\arrow{>}}}]
\draw[->] (inizializza) -- (identifica);
\draw[->] (identifica) -- (decidi);
\draw[->] (decidi) -- node {si} (accendi);
\draw (decidi.south) --([yshift=-1cm]decidi.south);
\draw[postaction={decorate}] ([yshift=-1cm]decidi.south) node[right,yshift=0.5cm]{No}--([yshift=-1cm,xshift=-3cm]decidi.south);
\draw[postaction={decorate}] ([xshift=-3cm,yshift=-1cm]decidi.south)--([xshift=-3cm,yshift=6cm]decidi.center);
\draw ([xshift=-3cm,yshift=6cm]decidi.center)--([yshift=6cm]decidi.center);
\draw (accendi.east) --([xshift=1.2cm]accendi.east);
\draw[postaction={decorate}] ([xshift=1.2cm]accendi.east) --([xshift=1.2cm,yshift=6cm]accendi.east);
\draw([xshift=1.2cm,yshift=6cm]accendi.east)--([yshift=6cm]decidi.center);
\fill[black] ([yshift=6cm]decidi.center) circle (3pt);

\end{scope}
\end{tikzpicture}
\end{document}

Output:

enter image description here

Old answer: Try like this:

\documentclass{article}
\usepackage{tikz}
\usetikzlibrary{arrows,shapes,decorations.markings}

\begin{document}

\begin{tikzpicture}[node distance=2cm, auto]
\tikzstyle{decision} = [diamond, text width=5.9em, text centered, draw=black, fill=blue!20, node distance=4cm]

\tikzstyle{startstop} = [rectangle, text width=7em, rounded corners, minimum height=1cm,text centered, draw=black, fill=white!20, node distance=3cm]

\tikzstyle{process} = [rectangle, text width=6em, text centered, draw=black, fill=white!20, node distance=3cm]

\tikzstyle{line} = [draw, -latex']

\centering
\node [startstop] (inizializza) {INIZIALIZZA MICRO};
\node [process, below of=inizializza] (identifica) {LEGGI PORTA DI INGRESSO};
\node [decision, below of=identifica] (decidi) {PULSANTE PREMUTO?};
\node [process, right of=decidi, node distance=4.5cm] (accendi) {ACCENDI LED};
\begin{scope}[thick,decoration={
    markings,
    mark=at position 0.5 with {\arrow{>}}}]
\draw[postaction={decorate}] (inizializza) -- (identifica);
\draw[postaction={decorate}] (identifica) -- (decidi);
\draw[postaction={decorate}] (decidi) -- node {si} (accendi);
\draw[postaction={decorate}] (decidi.west) --([xshift=-3cm]decidi.west);
\draw[postaction={decorate}] ([xshift=-3cm]decidi.west)--([xshift=-3cm,yshift=6cm]decidi.west);
\draw[postaction={decorate}] ([xshift=-3cm,yshift=6cm]decidi.west)--([yshift=6cm]decidi.center);
\draw[postaction={decorate}] (accendi.east) --([xshift=1.2cm]accendi.east);
\draw[postaction={decorate}] ([xshift=1.2cm]accendi.east) --([xshift=1.2cm,yshift=6cm]accendi.east);
\draw[postaction={decorate}]([xshift=1.2cm,yshift=6cm]accendi.east)--([yshift=6cm]decidi.center);
\fill[black] ([yshift=6cm]decidi.center) circle (3pt);
\end{scope}
\end{tikzpicture}
\end{document}

I used this answer: https://tex.stackexchange.com/a/3172/120578 and your code's image result-> Not the original. If you need more help, please be more specific.

PS: I had to break lines in parts to place the arrow on each middle.

Output:

enter image description here

Edit: Added the dot you request in your title.

koleygr
  • 20,105