Difference between revisions of "Exercise - Create an LED Component"

From Flowcode Help
Jump to navigationJump to search
Line 33: Line 33:
  
 
* In the same way, add another new property, with Cosmetic name "Connection", Property type 'Single digital pin' and Property variable name "pin".
 
* In the same way, add another new property, with Cosmetic name "Connection", Property type 'Single digital pin' and Property variable name "pin".
 +
 +
* Finally, configure these properties. To do this:
 +
::* Click on the color shown for the 'color' property.
 +
::* Select a color from the color chart that appears.
 +
::* Click on the word 'Unconnected', alongside the 'pin' property.
 +
::* Select an appropriate pin, such as RA0, from the chip pin layout.

Revision as of 09:41, 21 May 2013

  • Open a new Flowcode flowchart.
  • If they are not, then select them in the View Menu.
  • Click on the hemisphere shape in the Shapes menu and drag one onto the Systems Panel.
Gen ExerciseLEDcreate LEDcomp props01.jpg



  • The blue dotted square around it shows that this object is currently selected.
  • Right-click and select 'Center all objects' from the menu.
  • Change the name of the component to 'LEDcomponent'.
To do this:
  • Find the 'handle' of the component at the top of the Panel Properties.
  • Click on the name 'shape' (the default name).
  • Change it to 'LEDcomponent'.
  • Next, add a new property, 'color' to the component.
To do this:
  • De-select the hemisphere by clicking anywhere outside it in the Systems Panel.
  • Hover over the icon to the right of the 'Properties' label.
  • Click on the down-arrow that appears.
  • Click on 'Add new'.
  • In the 'Cosmetic name' box type "LEDcolor".
  • Select 'Color picker' for the 'Property type'.
  • Type "color" for the 'Property variable' name.
  • In the same way, add another new property, with Cosmetic name "Connection", Property type 'Single digital pin' and Property variable name "pin".
  • Finally, configure these properties. To do this:
  • Click on the color shown for the 'color' property.
  • Select a color from the color chart that appears.
  • Click on the word 'Unconnected', alongside the 'pin' property.
  • Select an appropriate pin, such as RA0, from the chip pin layout.