Flowcode 7 Component Creation
Flowcode 7 Component Creation
Flowcode 7 Component Creation
Start by creating a new Flowcode project. It does not matter what the target is, although it helps if you choose a
target that supports I2C. We can now start our new component by using existing base components.
Set the I2C properties, such as the Baud Rate, to match the
device.
From the device datasheet decide the API (macros) that you require to access the device functionality.
For this example we are assuming a device that provides a digital value of temperature, but it could just as easily
be a voltage, current or some other sensor.
We also require a macro that provides the same functionality for the simulation.
The LM75B I2C device has a bus address that is configurable via
the A0, A1 and A2 pins.
Now export this new component via the menu FILE->Export Component
It is important that you save any custom components to a directory other than the Flowcode components
directory. Otherwise if you store them along with the Flowcode released components your custom ones might
get deleted during an upgrade process.
Your custom components location directory can be added to the Flowcode search path by adding your directory
in the dialog found at menu VIEW->Global Options
Close Flowcode and re-open to include your new component and create a test program.
Your new component should appear in the default “Misc” list, if not changed, otherwise search for it by name.
Advanced options
You can create an additional component Category for your components by adding it to the list found in the xml
file "cmpntcats.xml" in your Flowcode installation components directory.
Using a simple text editor, add your category before the final </root> tag, for example:
Edit your component source project file to use this category by going to the component configuration dialog
FILE->Component configuration. Change the component category in the “Setup” “Standard” tab.
Save the project and export the changes from the menu FILE->Export Component