<sidebar>Sidebar: Controlling Electronic Devices With Flowcode</sidebar>
<sidebar>Sidebar: Controlling Electronic Devices With Flowcode</sidebar>
This exercise assumes that you have already built the Flowcode flowchart described in the exercise [[Exercise - Creating a Flowchart|Creating a Flowchart]]
This exercise assumes that you have already built the Flowcode flowchart described in the exercise [[Exercise - Creating a Flowchart|Creating a Flowchart]].
To set up and program the flowchart you must configure the icons and variables to create an effective and functioning process.
==Program the sequence==
==Program the sequence==
Revision as of 08:09, 18 July 2013
<sidebar>Sidebar: Controlling Electronic Devices With Flowcode</sidebar>
This exercise assumes that you have already built the Flowcode flowchart described in the exercise Creating a Flowchart.
To set up and program the flowchart you must configure the icons and variables to create an effective and functioning process.
Program the sequence
Now that the flowchart icons are correctly set up, we need to program them to carry out the following process:
Check if the switch is pressed.
If it isn't, go back to the beginning.
If it is:
Switch on the lamp;
Wait for 10 seconds;
Switch off the lamp;
Go back to the beginning.
It takes such a short time for the microcontroller to carry this out, that we don't need to worry whether the switch latches on or not.