Trying to learn Flow charting the roaming with whiskers program in chapter 2 of the Robotics w/bobt

I would like to introduce my students to flowcharting to help them understand the logic of the code. Can anyone help me with that?



  • 1 Comment sorted by Date Added Votes
  • Like what? techniques? do's and don'ts?

    I use flow charts all the time and do them in a way that I can easily convert them to state machines. To do this each block is assigned an index and each block must "fall through" in code meaning that there are no conditions that keep any one block in a suspended loop. If you need a loop, then one block must call another block by index reference back and forth until the condition is broken and the index changes to a different state. This allows for multiple state machines to take place and thread independently of each another. Since all blocks fall through, there is an index dispatcher for each state machine at the main loop of the program. I usually implement this all in Assembly language within my PIC micro processor programs. ... Many moons ago I had an instructor that was adamant that a "good" flow chart won't have any lines that cross or jump over one another and would count points off if you did not have proper escapement. It just has a cleaner more professional look when done this way. I follow that to this day with very few exception. i.e. one project I was working on required that I PAUSE or STOP anywhere in the flow (think E-STOP), and needed the ability to resume exactly where it left off if desired. Obviously with that you have to cross some lines somewhere.

    Beau Schwabe -- Submicron Forensic Engineer - ෴෴ - ෴෴

    Seriously at this point in the game "the ship has sailed" and "I have no expectations" <- said two brothers we ALL know
Sign In or Register to comment.