Difference between revisions of "Exercise - Using Component Macros"

From Flowcode Help
Jump to navigationJump to search
(Replaced content with "For an excellent introduction guide, we recommend [https://www.flowcode.co.uk/education/ Introduction to microcontroller programming]")
Tag: Replaced
 
(71 intermediate revisions by 5 users not shown)
Line 1: Line 1:
Component macros are sections of code that have been written to support the components included with Flowcode 6.<br />
+
For an excellent introduction guide, we recommend [https://www.flowcode.co.uk/education/ Introduction to microcontroller programming]
They take all the effort out of using these components.
 
This exercise uses them to control a particularly complicated, but very common device, the Liquid Crystal Display (LCD).
 
It uses it to display the elapsed time, once a switch has been pressed
 
 
 
 
 
__TOC__
 
 
 
==Formulate the sequence==
 
The flowchart sequence will be:
 
: 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.
 
 
 
 
 
==Set up the flowchart==
 
[[File:Gen_Startup_Selection.png||250px|right]]
 
* [[Opening Flowcode|Open Flowcode]].
 
 
 
 
 
The program 'knows' when you have added a component to the System or Dashboard panel.
 

Latest revision as of 13:23, 25 April 2023

For an excellent introduction guide, we recommend Introduction to microcontroller programming