Component modify help

For general Flowcode discussion that does not belong in the other sections.
Post Reply
solozerouno
Posts: 116
http://meble-kuchenne.info.pl
Joined: Tue Dec 08, 2020 4:36 am
Has thanked: 2 times
Been thanked: 2 times

Flowcode v10 Component modify help

Post by solozerouno »

I would need some information on the possibility of modifying a component such as a variable resistor to read an anlogic sensor.
How can you remove a macro you don't use and add others, how to use variables, how to change the name.... I've watched the videos but it doesn't show for example how to manage the variables that handle analogue inputs....
Can you help me?
Thank you very much Solozerouno.

chipfryer27
Valued Contributor
Posts: 1320
Joined: Thu Dec 03, 2020 10:57 am
Has thanked: 321 times
Been thanked: 462 times

Re: Component modify help

Post by chipfryer27 »

Hi

Many existing components are generic in nature and can be substituted for something entirely different when testing your code. For example if certain conditions are met, PortA-1 goes High illuminating a LED. The LED could represent anything from an actual LED to triggering complex electro-mechanical actions.

Similarly, the potentiometer component just represents a way to implement ADC and is probably rarely used in the capacity of a potentiometer.

You can modify certain parameters such as name by going to Properties and changing the Handle (no spaces allowed) and if you click on the arrow to the left of a component macro, you have the option to view as flowchart (helps you understand what it is doing) and Expose to top level where you could edit parameters/ constants/ variables.

I'm sure the WiKi etc can explain better than I.

You could also try creating your own component if the included ones don't meet your requirements.

Regards

solozerouno
Posts: 116
Joined: Tue Dec 08, 2020 4:36 am
Has thanked: 2 times
Been thanked: 2 times

Re: Component modify help

Post by solozerouno »

Can I know how to add or remove macros from my component or add functions to a macro or component I have created?
Thank you Solozerouno

medelec35
Matrix Staff
Posts: 1624
Joined: Wed Dec 02, 2020 11:07 pm
Has thanked: 576 times
Been thanked: 543 times

Re: Component modify help

Post by medelec35 »

Hello.
Macros (which will be the functions) can be added or removed by selecting File > Export > Edit the export settings for your component > Interface tab
There you will see all the macros that have been created via the User Macros menu or Macros within Project Explorer
You will need to select the type of macro, just select Downloadable macro
Martin

Post Reply