Arduino flowchart - Page 1
Forum section: electronics / beginners

author: JacquesBBB
author_rank: Frequent Contributor
timestamp: August 06, 2015, 11:18:55 am
content: 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 programis written.Thanks

author: zapta
author_rank: Super Contributor
timestamp: August 06, 2015, 11:45:27 am
content: .ino are C++ files so I'd you don't find Arduino specific, you can search for example for: c language flow chart extraction.

author: Rick Law
author_rank: Super Contributor
timestamp: August 06, 2015, 03:06:07 pm
content: Quote from: zapta on August 06, 2015, 11:45:27 amI absolutely refused to call an Arduino programs asketch. I think that is absolutely idiotic. It just caused confusion like the OP.

author: picandmix
author_rank: Frequent Contributor
timestamp: August 06, 2015, 03:25:58 pm
content: This is the only tool I know of -

author: zapta
author_rank: Super Contributor
timestamp: August 07, 2015, 03:19:19 am
content: Quote from: Rick Law on August 06, 2015, 03:06:07 pm... or to call C++ Wiring or to call daughter board a sketch.;-)

author: retrolefty
author_rank: Super Contributor
timestamp: August 07, 2015, 04:05:50 am
content: Quote from: zapta on August 07, 2015, 03:19:19 amDid 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.

author: Rick Law
author_rank: Super Contributor
timestamp: August 07, 2015, 04:20:30 am
content: 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.

author: rs20
author_rank: Super Contributor
timestamp: August 07, 2015, 05:07:19 am
content: We don't need another how-much-does-Arduino-suck thread.The OP may be interested inhttp://code2flow.com/.

author: zapta
author_rank: Super Contributor
timestamp: August 07, 2015, 05:26:35 am
content: Quote from: retrolefty on August 07, 2015, 04:05:50 amYes, shield.

author: Jeroen3
author_rank: Super Contributor
timestamp: August 07, 2015, 11:30:49 am
content: 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.

author: JacquesBBB
author_rank: Frequent Contributor
timestamp: August 07, 2015, 12:13:05 pm
content: 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 discussionQuote from: Rick Law on August 06, 2015, 03:06:07 pmI 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.Quote from: rs20 on August 07, 2015, 05:07:19 amI totally agree on that. This was not the intention of this thread. It has been misguided by the first answers.Quote from: rs20 on August 07, 2015, 05:07:19 amI 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.

author: LEDAero
author_rank: Regular Contributor
timestamp: August 07, 2015, 01:45:08 pm
content: 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...

author: retrolefty
author_rank: Super Contributor
timestamp: August 07, 2015, 02:17:25 pm
content: Quote from: LEDAero on August 07, 2015, 01:45:08 pmGreat story and shows that there is more then one way to arrive at a creative goal(s).

author: zapta
author_rank: Super Contributor
timestamp: August 07, 2015, 02:33:29 pm
content: Quote from: LEDAero on August 07, 2015, 01:45:08 pmHold your horses. I am a big Arduino fan but it doesn't mean that it's perfect, not should it become a religion.

author: JacquesBBB
author_rank: Frequent Contributor
timestamp: August 07, 2015, 03:00:02 pm
content: 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.

author: Jeroen3
author_rank: Super Contributor
timestamp: August 07, 2015, 03:44:38 pm
content: 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.

author: JacquesBBB
author_rank: Frequent Contributor
timestamp: August 07, 2015, 04:24:55 pm
content: Quote from: Jeroen3 on August 07, 2015, 03:44:38 pmI 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 languagehttps://fr.wikipedia.org/wiki/DOT_(langage)and I would like to know if some has done it for the "Arduino" (OUPS ! again ...)

author: Rick Law
author_rank: Super Contributor
timestamp: August 07, 2015, 04:53:55 pm
content: Quote from: rs20 on August 07, 2015, 05:07:19 amThat 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".

author: edavid
author_rank: Super Contributor
timestamp: August 07, 2015, 05:15:36 pm
content: Quote from: JacquesBBB on August 07, 2015, 03:00:02 pmIt'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.

author: Jeroen3
author_rank: Super Contributor
timestamp: August 07, 2015, 05:33:34 pm
content: Maybe some state machine diagrams.All part of UML, which is Unified_Modeling_Languagehttps://en.wikipedia.org/wiki/Unified_Modeling_LanguageThere are tools that are not as diy like Doxygen, and do more heuristic analysis of your software. But these are not free.

author: JacquesBBB
author_rank: Frequent Contributor
timestamp: August 07, 2015, 05:59:34 pm
content: Quote from: edavid on August 07, 2015, 05:15:36 pmI 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 :

author: edavid
author_rank: Super Contributor
timestamp: August 07, 2015, 06:02:51 pm
content: Quote from: JacquesBBB on August 07, 2015, 05:59:34 pmThat'snota flowchart, that's a call graph. Please change the thread title.Why can't you use doxygen for that?

author: Jeroen3
author_rank: Super Contributor
timestamp: August 07, 2015, 09:02:46 pm
content: That is precisely where doxygen was developed for.Here is a quality project documented with doxygen.http://chibios.sourceforge.net/docs3/rt/index.htmlHere is a library documented with doxygen.http://www.kvaser.com/canlib-webhelp/

author: aveekbh
author_rank: Regular Contributor
timestamp: August 08, 2015, 04:49:31 am
content: Quote from: Jeroen3 on August 07, 2015, 09:02:46 pmQuote from: JacquesBBB on August 07, 2015, 04:24:55 pmYou 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.