Author Topic: Arduino flowchart  (Read 11273 times)

0 Members and 1 Guest are viewing this topic.

Offline JacquesBBBTopic starter

  • Frequent Contributor
  • **
  • Posts: 829
  • Country: fr
Arduino flowchart
« on: August 06, 2015, 11:18:55 am »
Hi All,

Do you know any simple tool that would draw a flowchart out of a arduino .ino program ?

I do not want a tool for programming using flow chart, but only something that will draw the flowchart once the program
is written.

Thanks
 

Offline zapta

  • Super Contributor
  • ***
  • Posts: 6190
  • Country: us
Re: Arduino flowchart
« Reply #1 on: August 06, 2015, 11:45:27 am »
.ino are C++ files so I'd you don't find Arduino specific, you can search for example for: c language flow chart extraction.
 

Offline Rick Law

  • Super Contributor
  • ***
  • Posts: 3439
  • Country: us
Re: Arduino flowchart
« Reply #2 on: August 06, 2015, 03:06:07 pm »
.ino are C++ files so I'd you don't find Arduino specific, you can search for example for: c language flow chart extraction.

I absolutely refused to call an Arduino programs a sketch.  I think that is absolutely idiotic.  It just caused confusion like the OP.
 

Offline picandmix

  • Frequent Contributor
  • **
  • Posts: 395
  • Country: gb
Re: Arduino flowchart
« Reply #3 on: August 06, 2015, 03:25:58 pm »
This is the only tool I know of  -    :)

 

Offline zapta

  • Super Contributor
  • ***
  • Posts: 6190
  • Country: us
Re: Arduino flowchart
« Reply #4 on: August 07, 2015, 03:19:19 am »
.ino are C++ files so I'd you don't find Arduino specific, you can search for example for: c language flow chart extraction.

I absolutely refused to call an Arduino programs a sketch.  I think that is absolutely idiotic.  It just caused confusion like the OP.

... or to call C++ Wiring or to call daughter board a sketch.

;-)
 

Offline retrolefty

  • Super Contributor
  • ***
  • Posts: 1648
  • Country: us
  • measurement changes behavior
Re: Arduino flowchart
« Reply #5 on: August 07, 2015, 04:05:50 am »
.ino are C++ files so I'd you don't find Arduino specific, you can search for example for: c language flow chart extraction.

I absolutely refused to call an Arduino programs a sketch.  I think that is absolutely idiotic.  It just caused confusion like the OP.

... or to call C++ Wiring or to call daughter board a sketch.

;-)

 Did you mean shield rather then sketch?

 No denying that the Arduino folks created their own vocabulary in trying to reach the design artist users they were initially targeting. Confusing only to people that already worked with micros. Lots of early resistance from established users to the Arduino implementation. Wonder why it succeeded so well in reaching numbers never seen prior? No matter the Arduino Vs Arduino trademark war will surly mark a decline or splintering on their 'movement'.

 No matter, it helped fuel the maker movement and never has it been a better time to be an electronic hobbyist.
 

Offline Rick Law

  • Super Contributor
  • ***
  • Posts: 3439
  • Country: us
Re: Arduino flowchart
« Reply #6 on: August 07, 2015, 04:20:30 am »
I don't think the established or the experienced are confused.  Whom they do confuse are those who is looking for programming help and asks others (web searching) "How do I use a do in a sketch".

You brought up a good one.  The "shield" is another idiot thing - what is wrong with a "daughter card" or a "module".

(Not that I am in business anymore, but if I am) If I see in a resume/CV "extensive experience in sketch design and sketch development", that resume is heading straight to the garbage bin.
 

Offline rs20

  • Super Contributor
  • ***
  • Posts: 2318
  • Country: au
Re: Arduino flowchart
« Reply #7 on: August 07, 2015, 05:07:19 am »
We don't need another how-much-does-Arduino-suck thread.

The OP may be interested in http://code2flow.com/.
 

Offline zapta

  • Super Contributor
  • ***
  • Posts: 6190
  • Country: us
Re: Arduino flowchart
« Reply #8 on: August 07, 2015, 05:26:35 am »
Did you mean shield rather then sketch?

Yes, shield.
 

Offline Jeroen3

  • Super Contributor
  • ***
  • Posts: 4078
  • Country: nl
  • Embedded Engineer
    • jeroen3.nl
Re: Arduino flowchart
« Reply #9 on: August 07, 2015, 11:30:49 am »
How is your doxygen? Or you can use StartUML, but generating diagrams from user code is normally not a successful way, the other way works better since you then know the guidelines to use in syntax.

Arduino is called a sketch, because it's just that. A fast sketch to do some simple things.
There are shields to protect the sketcher from the complicated real world.
 

Offline JacquesBBBTopic starter

  • Frequent Contributor
  • **
  • Posts: 829
  • Country: fr
Re: Arduino flowchart
« Reply #10 on: August 07, 2015, 12:13:05 pm »
I am surprised to the way this thread goes. It seems that most of the answers did not read the original question and use it to rejuvenate some endless discussion

I absolutely refused to call an Arduino programs a sketch.  I think that is absolutely idiotic.  It just caused confusion like the OP.

I never called the arduino program  a  sketch, and I  even do not do it in private.
I call daughter boards daughter board, even for the arduino.

The reason I mentioned arduino programs is that although it is close to C++,  it will not compile if you use pure C++ compiler, as the compiler will then complain that there are no prototypes for the functions.
This is why I specifically asked for a tool for  arduino programs. But if you have a C++ tool that works, it is fine.

We don't need another how-much-does-Arduino-suck thread.
I totally agree on that. This was not the intention of this thread. It has been misguided by the first answers.

The OP may be interested in http://code2flow.com/.

I had check that, but it seems to be at a too fine  level. I  only want something that will show the connection of the various functions.
 
The following users thanked this post: ZL1CVD

Offline LEDAero

  • Regular Contributor
  • *
  • Posts: 77
  • Country: nz
Re: Arduino flowchart
« Reply #11 on: August 07, 2015, 01:45:08 pm »
My father and I have rather caught the 'maker' bug over the last year or so - starting with an Arduino.

I had no idea it was such a contentious area.

We didn't have much trouble with terminology - such as 'sketch' and 'shield' - being smart cookies it didn't present much in the way of a difficulty. Almost instantly we knew what people were talking about, that a sketch was a programme and a shield was a daughter-board.

If people are dismissing it as a failed platform based on such things I think they are missing the point: It's an easily accessible environment with a huge body of interest and thus, a huge body of work to reference. For a new adopter, this makes getting into it extremely easy.

And there are some immensely talented individuals out there giving up their time and effort to enhance the community.

We started simple - making christmas lights with Arduino Nano's and WS2811s.

Less than a year in and we were designing our own custom PCBs, making cool little toys and (even more cool) potentially marketable devices.

Now, less than 18 months after first placing an order, we are nearly finished on our reflow oven and have a great relationship with a man with $10M worth of SMD components that loves it when we spend money.

Of course there are 'better' MCUs out there - but not being an electronic engineer, I am limited in what I can achieve in the way of designing something that complicated. That being said, I have just finished my first board that includes a discrete Mega328P and our next project is set to utilise a number of large ASICs.

Heck of a lot of fun, and without the Arduino guys, we would still be flying kites and planes and wondering what to do of an evening...
 

Offline retrolefty

  • Super Contributor
  • ***
  • Posts: 1648
  • Country: us
  • measurement changes behavior
Re: Arduino flowchart
« Reply #12 on: August 07, 2015, 02:17:25 pm »
My father and I have rather caught the 'maker' bug over the last year or so - starting with an Arduino.

I had no idea it was such a contentious area.

We didn't have much trouble with terminology - such as 'sketch' and 'shield' - being smart cookies it didn't present much in the way of a difficulty. Almost instantly we knew what people were talking about, that a sketch was a programme and a shield was a daughter-board.

If people are dismissing it as a failed platform based on such things I think they are missing the point: It's an easily accessible environment with a huge body of interest and thus, a huge body of work to reference. For a new adopter, this makes getting into it extremely easy.

And there are some immensely talented individuals out there giving up their time and effort to enhance the community.

We started simple - making christmas lights with Arduino Nano's and WS2811s.

Less than a year in and we were designing our own custom PCBs, making cool little toys and (even more cool) potentially marketable devices.

Now, less than 18 months after first placing an order, we are nearly finished on our reflow oven and have a great relationship with a man with $10M worth of SMD components that loves it when we spend money.

Of course there are 'better' MCUs out there - but not being an electronic engineer, I am limited in what I can achieve in the way of designing something that complicated. That being said, I have just finished my first board that includes a discrete Mega328P and our next project is set to utilise a number of large ASICs.

Heck of a lot of fun, and without the Arduino guys, we would still be flying kites and planes and wondering what to do of an evening...

 Great story and shows that there is more then one way to arrive at a creative goal(s).
 

Offline zapta

  • Super Contributor
  • ***
  • Posts: 6190
  • Country: us
Re: Arduino flowchart
« Reply #13 on: August 07, 2015, 02:33:29 pm »
If people are dismissing it as a failed platform based on such things I think they are missing the point...

Hold your horses. I am a big Arduino fan but it doesn't mean that it's perfect, not should it become a religion.
 

Offline JacquesBBBTopic starter

  • Frequent Contributor
  • **
  • Posts: 829
  • Country: fr
Re: Arduino flowchart
« Reply #14 on: August 07, 2015, 03:00:02 pm »
Dear All,

Is it possible to ask a simple question related to arduino without having the thread polluted by endless discussions on how Arduino saved the world (or your world) or how Arduino is a piece of S*** ?

Please open another thread if you really want to have this discussion.

 
 

Offline Jeroen3

  • Super Contributor
  • ***
  • Posts: 4078
  • Country: nl
  • Embedded Engineer
    • jeroen3.nl
Re: Arduino flowchart
« Reply #15 on: August 07, 2015, 03:44:38 pm »
It's called doxygen. But you still need to put in hints in the code comment on how to draw the diagrams.

There are no magic tools that understand any code and plot diagrams.
 

Offline JacquesBBBTopic starter

  • Frequent Contributor
  • **
  • Posts: 829
  • Country: fr
Re: Arduino flowchart
« Reply #16 on: August 07, 2015, 04:24:55 pm »
It's called doxygen. But you still need to put in hints in the code comment on how to draw the diagrams.

There are no magic tools that understand any code and plot diagrams.

I know doxygen, but I would like something less cumbersome, and which does not require to  put anything in the code.
I do not want a tool that understand any language. This is why I specify "Arduino" (OUPS !  I said it again, I will have again a dozen of answers saying that they love or hate arduino ... ).

I know it is possible to do something like that using for example the DOT language https://fr.wikipedia.org/wiki/DOT_(langage)
and I would like to know if some has done it for the "Arduino" (OUPS ! again ...)
 
 

Offline Rick Law

  • Super Contributor
  • ***
  • Posts: 3439
  • Country: us
Re: Arduino flowchart
« Reply #17 on: August 07, 2015, 04:53:55 pm »
We don't need another how-much-does-Arduino-suck thread.

The OP may be interested in http://code2flow.com/.

That is not what was said.  No one was saying Arduino sucks.  What was brought up was just their idiotic use of the two words: "sketch" and "shield".
 

Online edavid

  • Super Contributor
  • ***
  • Posts: 3381
  • Country: us
Re: Arduino flowchart
« Reply #18 on: August 07, 2015, 05:15:36 pm »
Is it possible to ask a simple question related to arduino without having the thread polluted by endless discussions on how Arduino saved the world (or your world) or how Arduino is a piece of S*** ?

It's not a simple question, and it's not related to Arduino.

First, there is no tool that can understand code and draw a meaningful flowchart.  That is far beyond current AI.

Second, if such a tool existed, it would not be Arduino specific.  Why would you think otherwise?  There is no Arduino language, Arduino programs are C++.

Finally, why do you want to do this?  Programmers no longer use flowcharts.
« Last Edit: August 07, 2015, 05:17:23 pm by edavid »
 

Offline Jeroen3

  • Super Contributor
  • ***
  • Posts: 4078
  • Country: nl
  • Embedded Engineer
    • jeroen3.nl
Re: Arduino flowchart
« Reply #19 on: August 07, 2015, 05:33:34 pm »
Maybe some state machine diagrams.

All part of UML, which is Unified_Modeling_Language https://en.wikipedia.org/wiki/Unified_Modeling_Language

There are tools that are not as diy like Doxygen, and do more heuristic analysis of your software. But these are not free.
 

Offline JacquesBBBTopic starter

  • Frequent Contributor
  • **
  • Posts: 829
  • Country: fr
Re: Arduino flowchart
« Reply #20 on: August 07, 2015, 05:59:34 pm »
Finally, why do you want to do this?  Programmers no longer use flowcharts.

I do. Its not really a flowchart of the logic structure of a program that I want, but  the  interrelations of the routines.
I find it  very useful. 
I want something like this :
 

Online edavid

  • Super Contributor
  • ***
  • Posts: 3381
  • Country: us
Re: Arduino flowchart
« Reply #21 on: August 07, 2015, 06:02:51 pm »
Finally, why do you want to do this?  Programmers no longer use flowcharts.

I do. Its not really a flowchart of the logic structure of a program that I want, but  the  interrelations of the routines.

That's not a flowchart, that's a call graph.  Please change the thread title.

Why can't you use doxygen for that?
 

Offline Jeroen3

  • Super Contributor
  • ***
  • Posts: 4078
  • Country: nl
  • Embedded Engineer
    • jeroen3.nl
Re: Arduino flowchart
« Reply #22 on: August 07, 2015, 09:02:46 pm »
That is precisely where doxygen was developed for.

Here is a quality project documented with doxygen.
http://chibios.sourceforge.net/docs3/rt/index.html

Here is a library documented with doxygen.
http://www.kvaser.com/canlib-webhelp/
 

Offline aveekbh

  • Regular Contributor
  • *
  • Posts: 62
  • Country: in
Re: Arduino flowchart
« Reply #23 on: August 08, 2015, 04:49:31 am »
That is precisely where doxygen was developed for.

I know doxygen, but I would like something less cumbersome, and which does not require to  put anything in the code.

You don't need to add any Doxygen-specific comments to generate a call flow graph. Set CALL_GRAPH = YES, or you could use Doxywizard to select it.
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf