Exercise - Documenting a Flowchart

From Flowcode Help
Jump to navigationJump to search

<sidebar>Sidebar: Flowcode Exercises:Ex1</sidebar> This exercise assumes that you have created and tested the program described in exercise Transferring a Program to the Microcontroller.

Documenting the flowchart is essential in some projects, although we have properly labelled the icons, a few comment icons helps to further explain the program and the process in further detail to aid expansion and helps others understand the system.



Load the Flowcode flowchart


Benefits of documentation

Documenting your flowchart is very useful - it allows other users to understand your flowchart and allows them to learn and even add to your flowchart to help produce the final program and increase efficiency throughout the system.

Adding comments to document your flowchart is extremely easy and very useful, using comments allows you to clarify the process, purpose and function of your program and allows others to understand it so they can see what is going on and learn from it and even help to develop the program, even by suggestion a more efficient method or directly editing a icon to function more effectively.


Adding comments

Exercise Documenting a Flowchart Final Flowchart.png
  • Explain the purpose of the loop and how it is the base of the process.
The loop is the base of the program as it allows the program to continually check if the switch has been pressed by repeating the process of detecting the state of the switch.


  • Add a comment above the 'Input' icon.
  • Open the icon properties by double clicking on the 'Comment' icon.
  • Describe the use of the 'Input' icon and how it reads the state of the switch.
The 'Input' icon uses a variable to read and store the state of the switch, this allows the information contained in the variable to be used to see if the switch is being pressed or not.


  • Comment and document the 'Decision' icon.
  • Describe how the 'Decision' icon detects the state of the switch and decides the next step to take.
The 'Decision' icon will read the information in the variable to see if the switch has been pressed, it then decides which process path to follow next, if it is not being pressed it will go straight through to the loop and continually check if the switch is being pressed or not. If the switch is being pressed the following icons activate the LED and turns it off after 10 seconds.


  • Comment and document the 'Output' icon.
  • Describe the function of the 'Output' icon.
Once the 'Decision' icon detects that the switch is being pressed, the 'Output' icon turns on / lights up the LED and indicates that the switch has been pressed.


  • Comment and document the 'Delay' icon.
  • Describe the function and purpose of the icon.
This delays the program and stops it from continuing with another process, this allows the LED to stay lit up due to the previous command, this delay lasts 10 seconds until the program is then continued.


  • Comment and document the second 'Output' icon.
  • Explain the function of this icon and the process afterwards.
After the 10 second delay, this icon will turn the LED off and then continue the process of the program, which in turn, will loop to check if the button is being pressed again, this is the completes the circuit and will continue to loop and repeat the process, until stopped.


Save the Flowchart

  • Save the flowchart using the same name. The simplest way to do this is to click on the 'Save' icon. Btn Save.png
For more information, see Saving a Flowchart.


Download the exercise

You can download the file created by this exercise and open it in Flowcode to identify errors in your program/file or you could also download the file to skip to the next exercise.

  • To download the file, click on the link below and then either:
  • Click on the file name.
  • Right click the file name and select 'Save link as...' or 'Save target as...' (depending on your browser).
FC6 Icon.png

Exercise - Documenting a Flowchart


What next?

Now that the flowchart is complete, and documented correctly, you can further expand and develop the flowchart in the next exercise Expanding a Program.