Skip to content

Mates Studio Blocks Editor

Introduction

Mates Studio's Builder environment features a graphical programming interface, Blocks Editor, allowing both beginners and seasoned developers to control the flow of their application by simply visually connecting blocks.

Block Editor Interface

The image shows a newly started Builder project. Boxed are the parts of the Block Editor, the toolbox and the workspace.

  1. Toolbox: This contains the available blocks that can be added to the workspace. Blocks are grouped into several categories to easily search for the desired features.
  2. Workspace: As the name suggests, this is the main work area during development. This allows you to design the application's workflow.

Blocks are the fundamental elements of the Builder environment. These can be connected to each other in the workspace using their input and output connectors.

Block Input Types

Input connectors can either be value or statement input. These connectors are present in the right side of each block or internally in the case of value inputs. A block can have multiple input connectors.

Value Input Connector

Value Input Connector

This connector accepts a single value block

Statement Input Connector

Statement Input Connector

This connector accepts multiple statement blocks

Blocks can also include internal inputs. Internal inputs provides fixed rules or items for the block. These can either be an integer input, a text input, a color input or a dropdown input.

Integer Input

Integer Input

A simple number input which automatically corrects the value to the nearest integer which falls under a preset allowable range

Text Input

Text Input

A simple text input allowing to specify names or text value for the block

Color Input

Color Input

A color input that provides a simple preset color selector

Dropdown Input

Dropdown Input

A dropdown selector which provided acceptable values that the block accepts

Block Output Types

Output connectors are always present in either the left side, top side or top and bottom side of the block. These connectors can either be a value output or a statement output. A block can only have either a value or statement outputs, but not both types.

Value Output Connector

Value Output Connector

This connector can connect to blocks with a value input connector

Statement Output Top and Bottom Connector

Statement Output Top and Bottom Connector

This connector can connect to statement blocks with a top connector effectively joining the group of statement blocks. With the bottom connector, it allows more statement blocks to join the group.

Statement Output Top Connector

Statement Output Top Connector

This connector can connect to statement blocks with the bottom connector effectively joining the group of statement blocks. Having no bottom connector, it is not possible to connect another block below this signifying the end of actions performed by the group.

Blocks Classification

These blocks can be classified depending on their output type.

In terms of output, blocks can be classified as a function block, a value block or a statement block.

Function Block

These are blocks with no output connector. This type of blocks helps organize the workspace by simplifying repeated multi-block actions.

Value Block

These blocks provides a left output connector. This type of blocks provides a value to a parent block that will be used to perform the desired action.

Statement Block

These blocks provides the top connector and, optionally, the bottom output. This type if blocks can be connected together to group actions to be performed by a parent block with a statement input connector.

Mates Blocks

The Mates category includes blocks that directly interact and control the screen. This include backlight, page, widget and touch related blocks.

Main Application

Main Application Block

All Builder project starts with the main application block. It provides two statement inputs named setup and loop.

Input Type Description
setup statement all tasks to be performed at the beginning of the program which is during boot or immediately after a reset
loop statement all tasks to be performed indefinitely after performing the necessary setup

Graphics Blocks

This group contains blocks used for backlight, page and widget control and query.

Set Backlight Level

Set Backlight Level

This block sets the backlight level of the display module.

Input Type Description
level value intensity of backlight, must be between 0 and 15

Examples

Set Backlight to Integer Value

Set Backlight to Variable Value

Set Page

Set Page

This block changes the project to the selected page. The page dropdown input lists all pages included in the project.

Input Type Description
page value target page to change into

Examples

Set Page to Existing Page

Set Page to Variable Value

Get Current Page

Get Page

This block can be used to query the current page of the running project.

Return

Active page

Evaluate Page

Evaluate Page

Get Number of Pages

Get Number of Pages

This block can be used to check the number of pages included in the project.

Return

Number of pages in project

Increment Page and Loop to Page0

Increment Page and Loop to Page0

Set Widget Value

Set Widget Value

This block changes the value of the selected widget. The widget dropdown input lists all applicable widgets.

Input Type Description
widget dropdown the target widget
value value the value the target widget will be set to

Examples

Set Gauge to Integer Value

Set Gauge to Variable Value

Set Gauge to Slider Value

Note

It is recommended to simply link values of widgets by setting their properties as discussed here.

Get Widget Value

Get Widget Value

This block queries the value of the selected widget. The widget dropdown input lists all applicable widgets.

Input Type Description
widget dropdown the target widget

Return

Value of the target widget

Examples

Store Slider Value

Set Gauge to Slider Value

Note

It is recommended to simply link values of widgets by setting their properties as discussed here.

Set Spectrum Column Value

Set Spectrum Column Value

This block changes the value of the selected column of the target spectrum. The spectrum dropdown input lists all Spectrum widgets in the project.

Input Type Description
column value the target column index, must be less than number of columns of the target spectrum
Spectrum dropdown the target Spectrum widget
value value the value the target column will be set to

Examples

Set Column 0 of Spectrum to Integer Value

Set Column col of Spectrum to Integer Value

Set Column col of Spectrum to Variable

Update TextArea

Update TextArea

This block updates the target TextArea. The TextArea dropdown input lists all TextArea widgets in the project.

Input Type Description
TextArea dropdown the target TextArea widget
format dropdown the formatting to use when writing the value
value value the value to update the DotMatrix with

Examples

Update TextArea with String

Update TextArea with String from Variable

Update TextArea with Decimal from Variable

Update DotMatrix

Update DotMatrix

This block updates the target DotMatrix. The DotMatrix dropdown input lists all DotMatrix widgets in the project.

Input Type Description
DotMatrix dropdown the target DotMatrix widget
format dropdown the formatting to use when writing the value
value value the value to update the DotMatrix with

Examples

Update DotMatrix with Integer

Update DotMatrix with String from Variable

Update DotMatrix with Decimal from Variable

Clear PrintArea

Clear PrintArea

This block clears the target PrintArea. The PrintArea dropdown input lists all PrintArea widgets in the project.

Input Type Description
PrintArea dropdown the target PrintArea widget

Set PrintArea Color

Set PrintArea Color

This block sets a new color for the target PrintArea to use. The PrintArea dropdown input lists all PrintArea widgets in the project.

Input Type Description
PrintArea dropdown the target PrintArea widget
color value the new color value to use when appending to the target PrintArea

Examples

Set Print Area Color

Set Print Area Color to RGB

Set Print Area Color to Variable

Append to PrintArea

Append to PrintArea

This block appends the specified value to the target PrintArea. The PrintArea dropdown input lists all ASCII type PrintArea widgets in the project.

Input Type Description
format dropdown the formatting to use when writing the value
value value the value to update the PrintArea with
PrintArea dropdown the target PrintArea widget

Print Temperature to PrintArea

Print Temperature to PrintArea

Append Bytes to PrintArea

Append Bytes to PrintArea

This block appends the specified array to the target PrintArea. The PrintArea dropdown input lists all HEX type PrintArea widgets in the project while the array dropdown lists all variables in the project.

Input Type Description
count integer the number of bytes to write from the array
array dropdown a variable with an array of values to update the PrintArea with
PrintArea dropdown the target PrintArea widget

Print HEX Values to PrintArea

Print HEX Values to PrintArea

Note

  1. A variable array is automatically created if it doesn't exist.
  2. Ensure that the variable selected is initialized as an array using the Create Array block.

Append Values to Scope

Append Values to Scope

This block appends the specified array to the target Scope. The Scope dropdown input lists all Scope widgets in the project while the array dropdown lists all variables in the project.

Input Type Description
count integer the number of values to write from the array
array dropdown a variable with an array of values to update the Scope with
Scope dropdown the target Scope widget

Append Array to Scope

Append Array to Scope

Note

  1. A variable array is automatically created if it doesn't exist.
  2. Ensure that the variable selected is initialized as an array using the Create Array block.

Touch Input Blocks

Touch input blocks are only available for BBM modules with a touchscreen interface.

Get Event Button ID

Get Event Button ID

This block provides a selection of all buttons recording an event. This is useful when evaluating the recorded button events. The button dropdown input lists all Momentary and Grouped button widgets in the project.

Input Type Description
button dropdown the momentary or grouped button

Return

ID of the selected button

Examples

Evaluate Button Press

Evaluate Button Press Continuous

Get Number of Recorded Button Events

Get Number of Recorded Button Events

This block can be used to query the number of unread recorded button events.

Return

Number of unread button events

Example

See Get Event Button ID section

Get Next Button Event

Get Next Button Event

This block can be used to read/query the source of the next recorded button event.

Return

ID of the source button

Example

See Get Event Button ID section

Get Number of Recorded Swipe Events

Get Number of Recorded Swipe Events

This block can be used to query the number of unread recorded swipe events.

Return

Number of unread swipe events

Get Next Swipe Event

Get Next Swipe Event

This block can be used to read the value of the next recorded swipe event.

Return

Value of the swipe event

Dynamic Blocks

Dynamic blocks can be created multiple times. These can be used to further expand and provide more freedom in project development.

Variables

Variables are key components in text programming. The builder environment allows creation of global variables. Once a variable is created, setter, getter and change blocks are generated.

A setter block allows the variable to be set while a getter block queries the value of the variable. A variable change block can be used to increase or decrease the value of the variable.

All of these blocks provides a dropdown selector listing the available variables. From the dropdown selector, several actions can be performed including selection, renaming and deletion of the variables.

A variable can be created by going to the Variables category and clicking the Create variable button.

Create Variable

This will open a prompt requesting a new variable name.

New Variable Prompt

Alternatively, some blocks generate variables it requires. A good example are Create Function blocks which generate their inputs as new variables as required. Other blocks that behave this way are those with variable dropdown which defaults to a specific variable name. In this case, the default variable is generated as required.

Set Variable

Set Variable

This blocks allows developers to set the value of the selected variable.

Input Type Description
variable dropdown the target variable to set
value value the value to set the variable to

Get Variable

Get Variable

This blocks allows developers to query the current value of the selected variable.

Input Type Description
variable dropdown the target variable to query

Return

Value of the variable

Change Variable by Value

Change Variable

This blocks allows developers to change the value of the selected variable by the value specified.

Input Type Description
variable dropdown the target variable to change
value value the value to change the variable by

Functions

Functions are another useful feature from text-based programming. Like in text programming, the builder environment provided block functions allowing developers to simplify repeated actions by grouping the blocks together and allowing these group of actions to be called and performed using a single block.

Create Function without Return Input

Create Function without Return Input

This allows developers to group blocks to perform every time the function is called.

Create Function without Return Input and with Value Inputs

Functions can be configured to take one or more value inputs by clicking the gear icon of the block to edit the configuration. The configure function inputs are also added as global variables.

Input Type Description
name text unique name to identify the function
actions statement all the actions to be performed by the function when called

Create Function with Return Input

Create Function with Return Input

This allows developers to group blocks to perform every time the function is called. It also provides a return value input. This is useful when performing reads or computations.

Create Function with Return Input and Value Inputs

Functions can be configured to take one or more value inputs by clicking the gear icon of the block to edit the configuration. The configure function inputs are also added as global variables.

Input Type Description
name text unique name to identify the function
actions statement all the tasks to be performed by the function when called
return value the output value of the function after executing all tasks

Function Return

Function Return Block

This block can be used to exit a function if a certain condition is met. Depending on the type of function, with or without return input, this block will automatically transform as required

Function without Return Input and with Return Block

If used in a function with no return input, this block transforms to suitable block as shown. Notice that the value input is removed.

Function with Return Input and Return Block

If used in a function with a return input, this block reverts to its original state. Notice that the value input is added.

Input Type Description
condition value the condition to check for evaluating returns
return value the output value of the function (if applicable)

Call Function

Call Function

This block calls the function of the same name. This is available after a function with no return input is created.

Call Function with Inputs

This may have one or more value inputs depending on the configuration of the function.

Call Function and Return Value

Call Function and Return Value

This block calls the function of the same name and returns the output value. This is available after a function with return input is created.

Call Function with Inputs and Return Value

This may have one or more value inputs depending on the configuration of the function.

Return

Output of the function

Utility Blocks

This group provides useful blocks for designing program flow (conditions, loops, etc.), basic computation and value assignments.

Logic Blocks

Logical Comparison

Logical Comparison

This allows developers to create comparisons which is typically used as test conditions that can be evaluated by other blocks.

Logical Comparison Options

Available comparisons are as shown.

Input Type Description
a value left side value for the comparison
operator dropdown equality operators for testing the two values
b value right side value for the comparison

Return

Result of the comparison, true or false

Example

Evaluate Variable Value

Compare Two Variables

Store Result

Logical Operations

Logical Operation

This allows developers to combine multiple Logical Comparisons. This can be nested as multiple Logical Operation blocks. This is also typically used as test conditions that can be evaluated by other blocks.

Logical Operation Options

Available operations are as shown.

Input Type Description
a value left side value for the operation
operator dropdown logical operators for joining the two values
b value right side value for the operation

Return

Result of the operation, true or false

Examples

Check if Both are True

Check if Any is True

Store Result

Logical Negate

Logical Not Operation

This allows developers to invert the output of Logical Comparisons and Logical Operations and is also typically used as test conditions that can be evaluated by other blocks.

Input Type Description
condition value the condition to evaluate and negate

Return

Negated value of the test condition

Examples

Negate Variable

Negate Logical Comparison

Store Result

Logical Ternary Operation

Logical Ternary Operation

This allows developers to evaluate the output of Logical Comparisons and Logical Operations and return a value depending on the truthfulness of the test condition.

Input Type Description
test value the condition to evaluate
true value the return value if condition is true
false value the return value if condition is false

Return

The evaluated return value

Examples

Test Variable

Test Logical Comparison

Store Result

Conditional If-Else

If-Else Block

This allows developers to evaluate test conditions that will be evaluated to select which group of tasks to perform. Test conditions are usually created using the Logical Comparison block.

If-Else Configuration

The block can be configured to add multiple test conditions (else if) and a default (else) condition which is triggered when none of the specified test conditions are met.

Input Type Description
condition value condition to evaluate before performing tasks
do statement all the tasks to perform if condition is true

Evaluate Button Press

Evaluate Button Press

Note

Number of condition and do inputs increases depending on configuration

Evaluate Horizontal Swipe

Evaluate Horizontal Swipe

This block evaluates the selected variable for the horizontal direction of swipe. The variable must be previously set to the Get Next Swipe Event block. Developers can use this to perform different tasks depending on whether the screen is swiped going left or right.

Input Type Description
variable dropdown the variable to evaluate for the swipe direction
right statement all the tasks to perform if the swipe event is from left to right
left statement all the tasks to perform if the swipe event is from right to left

Examples

Evaluate Horizontal Swipe Once

Evaluate Horizontal Swipe Continuously

Note

  1. This block is only available for BBM modules with a touchscreen interface.
  2. A variable swipe is created automatically if it doesn't exist.

Evaluate Vertical Swipe

Evaluate Vertical Swipe

This block evaluates the selected variable for the horizontal direction of swipe. The variable must be previously set to the Get Next Swipe Event block. Developers can use this to perform different tasks depending on whether the screen is swiped going up or down.

Input Type Description
variable dropdown the variable to evaluate for the swipe direction
up statement all the tasks to perform if the swipe event is upwards
down statement all the tasks to perform if the swipe event is downwards

Examples

Evaluate Vertical Swipe Once

Evaluate Vertical Swipe Continuously

Note

  1. This block is only available for BBM modules with a touchscreen interface.
  2. A variable swipe is created automatically if it doesn't exist.

Loops Blocks

Repeat Count

Repeat Count

This block allows developers to perform a group of operations a fixed number of times.

Input Type Description
count value the number of times to perform the operations
actions statement all the tasks to perform

Print Multiple Times

Print Multiple Times

Repeat While or Until

Repeat While

This block allows developers to perform a group of operations repeatedly depending on the condition set.

Repeat Options

This can be used to either perform operations while condition is true or until it becomes true.

Repeat Until

Input Type Description
mode dropdown determines whether to perform tasks while or until the condition is true
condition value condition to evaluate before performing tasks
actions statement all the tasks to perform

Examples

Evaluate Vertical Swipe Continuously While

Evaluate Vertical Swipe Continuously Until

Note

Since number of swipe events decrements every time the next swipe event is read, both examples do the same thing.

Count with Variable

Count with Variable

This block can be used to perform a group of operations while counting with a variable. The variable is checked at the start of each loop and incremented/decremented at the end of each. The loop stops when the end value is reached.

Input Type Description
variable dropdown the target variable to count with
start value the starting value to count from
end value the target end value until loop exits
increment value the amount to increment the counter every loop
actions statement all the tasks to perform

Note

A variable i is created automatically if it doesn't exist.

Break or Continue

Break Loop

This block can be used to provide additional control over loops.

Break/Continue Options

It can be used to completely break out of a loop block or to skip the succeeding tasks and continue to the next iteration of the loop.

Continue Next Iteration

Input Type Description
mode dropdown determines whether to break the loop or continue to the next iteration

Example

Break Out of Loop

Skip and Continue

Math Blocks

Number

Number

This block can be used to specify a constant 16-bit integer.

Input Type Description
value integer the constant 16-bit integer value

Return

Specified value, integer

Arithmetic Operation

Arithmetic Operation

This block can be used to perform basic arithmetic operations.

Arithmetic Operation Dropdown

Available operations are as shown.

Input Type Description
a value left side value for the operation
operator dropdown equality operators to perform for the two values
b value right side value for the operation

Return

Result of the operation, integer

Bitwise Operation

Bitwise Operation

This block can be used to perform bitwise operations.

Bitwise Operation Dropdown

Input Type Description
a value left side value for the operation
operator dropdown equality operators to perform for the two values
b value right side value for the operation

Return

Result of the operation, integer

Check Number

Check Number

This block can be used to perform basic number checking.

Check Number Dropdown

Input Type Description
value value value to check
mode dropdown mode of checking to perform

Return

Whether the value fall under the selected mode. True (1) or False (0)

Advanced Function

Advanced Function

This block can be used to perform higher level math functionalities such as sine and cosine, absolute value, and square root.

Advanced Function Dropdown

Input Type Description
mode dropdown function to perform
value value input value for the operation

Return

Output of the operation, integer

Minimum / Maximum

Minimum / Maximum

This block can be used to identify the maximum or minimum value from the two values provided.

Minimum / Maximum Dropdown

Input Type Description
mode dropdown whether to get the minimum or maximum between the two values
a value first value to check
b value second value to check

Return

The minimum or maximum between the two values depending on what mode is selected

Remainder

Remainder

This block can be used to identify the remainder of a division operation.

Input Type Description
a value left side value for the operation
b value right side value for the operation

Return

The remainder of the division operation

Constrain

Constrain

This block can be used to limit the value to a certain range

Input Type Description
value value input value to be constrained
minimum value minimum limit of the constrain
maximum value maximum limit of the constrain

Return

  • value, if value is in range
  • minimum, if value is less than minimum
  • maximum, if value is greater than maximum

Random

Random

This block can be used to generate a pseudo random number from a specified range.

Input Type Description
minimum value minimum limit of the random number
maximum value maximum limit of the random number

Return

A pseudo random number between the specified range

Text Blocks

String Value

String Value

This block can be used to specify a constant string value.

Input Type Description
value text constant string value

Return

Pointer to string

Length of String

Length of String

This block can be used to check the length of string.

Input Type Description
value value pointer to string or constant string

Return

Length of string

String is Empty

String is Empty

This block can be used to check if string is empty.

Input Type Description
value value pointer to string or constant string

Return

Whether the string is empty (1) or not (0), boolean

Print Value

This block can be used to print a value as the default print format at the current cursor position.

Input Type Description
value value pointer to string or constant string

Print Value Mode

This block can be used to print a value as the selected format at the current cursor position.

Print Value Mode Dropdown

Input Type Description
format dropdown format to print the value as
value value pointer to string or constant string

Print Value Position

This block can be used to print a value as the selected format at the current cursor position.

Print Value Position Dropdown

Input Type Description
format dropdown format to print the value as
value value pointer to string or constant string
x value left pixel position to print the value at
y value top pixel position to print the value at

Arrays Blocks

Create

Create Array

This block can be used to create an array and set it to a variable.

Input Type Description
variable dropdown the target variable to assign the array to
count integer the number of elements in the array

Note

It is important to delete the array if it is not required anymore.

Delete

Delete Array

This block can be used to delete a previously created array and clear the memory.

Input Type Description
variable dropdown the target variable containing the array to clear

Recreate

Recreate Array

This block can be used to recreate an array and set it to the same variable. This is useful when reusing the same variable to contain a new array.

Input Type Description
variable dropdown the target variable to assign the array to
count integer the number of elements in the array

Set Element

Set Array Element

This block can be used to assign a value to an element of the array.

Input Type Description
variable dropdown the variable containing the array
index value the index of the element to update
value value the new value of the target array element

Get Element

Get Array Element

This block can be used to query a value to an element of the array.

Input Type Description
variable dropdown the variable containing the array
index value the index of the element to query

Return

The value of the element at specified index

Color Blocks

Color Picker

Color Picker

This block can be used to specify a constant color value from a color picker input.

Input Type Description
value color constant color value

Return

16-bit color value

Color from RGB

Color from RGB

This block can be used to specify a constant color value.

Input Type Description
red value red component of color value
green value green component of color value
blue value blue component of color value

Return

16-bit color value

System Blocks

This group provides useful blocks allowing developers to utilize additional hardware features available for the BBM module.

GPIO Blocks

Digital Output

Digital Output

This block can be used to set a GPIO as a digital output pin.

Input Type Description
pin dropdown the pin to use as digital output

Set Output Value

Set Output Value

This block can be used to set the value of a digital output pin.

Input Type Description
pin dropdown the pin to update the value of
value value the digital value to set the pin to

Note

The pin must be set as digital output before using this block.

Digital Input

Digital Input

This block can be used to set a GPIO as a digital input pin.

Input Type Description
pin dropdown the pin to use as digital input

Analog Input

Analog Input

This block can be used to set a GPIO as a analog input pin.

Input Type Description
pin dropdown the pin to use as analog input

Read Input Value

Read Input Value

This block can be used to read the value of an input pin.

Input Type Description
pin dropdown the pin to read the value of

Return

High (1) or Low (0)

0 to 4095 (0V to 3.3V)

Note

The pin must be set as digital input or analog input before using this block.

Timers Blocks

System Time

System Time

This block can be used to read the system time in milliseconds.

Return

The current system timer value in milliseconds

Delay

Delay

This block can be used to pause program execution for a period of time in milliseconds.

Input Type Description
period value the delay period in milliseconds

Set Countdown Timer

Set Countdown Timer

This block can be used to start a countdown timer to a starting period in milliseconds.

Input Type Description
timer dropdown the timer instance to use for the countdown
period value the delay period in milliseconds

Get Remaining Time

Get Remaining Time

This block can be used to query the remaining time on a countdown timer.

Input Type Description
timer dropdown the timer instance to check for the countdown

Return

Remaining time in milliseconds

Serial Blocks

Open Serial

Predefined Baudrate

Open Serial with Predefined Baudrate

This block can be used to open UART port using a predefined baudrate using the default 8N1 configuration.

Open Serial with Predefined Baudrate Dropdown

Input Type Description
baudrate dropdown the predefined baudrate to use the UART in

This include special high baudrate options that custom baudrate is not able to provide.

Custom Baudrate

Open Serial with Custom Baudrate

This block can be used to open UART port using a custom baudrate using the default 8N1 configuration.

Input Type Description
baudrate integer the custom baudrate to use the UART in (max: 655350)

Open Serial Options

Predefined Baudrate

Open Serial with Predefined Baudrate Options

This block can be used to open UART port using a predefined baudrate using a custom UART configuration.

Open Serial with Predefined Baudrate Options Dropdown

Here are the available parity options.

Open Serial with Predefined Baudrate Options Parity Dropdown

Here are the available stop bit options.

Open Serial with Predefined Baudrate Options Stop Bit Dropdown

Input Type Description
baudrate dropdown the predefined baudrate to use the UART in
parity dropdown the parity option for the UART configuration
stop dropdown the stop bit option for the UART configuration

Custom Baudrate

Open Serial with Custom Baudrate Options

This block can be used to open UART port using a predefined baudrate using a custom UART configuration. Here are the available parity options.

Open Serial with Custom Baudrate Options Parity Dropdown

Here are the available stop bit options.

Open Serial with Custom Baudrate Options Stop Bit Dropdown

Input Type Description
baudrate integer the custom baudrate to use the UART in (max: 655350)
parity dropdown the parity option for the UART configuration
stop dropdown the stop bit option for the UART configuration

Send Byte

UART Send Byte

This can be used to send a single byte to the connected UART device.

Input Type Description
byte value the byte value to send

Note

  1. It is recommended that the Serial UART is opened using default or custom options. Otherwise, it will use the default UART configuration as describe in the processor datasheet.
  2. If value is a variable or 16-bit, only the low byte will be sent.

Send Value

UART Send Value

This can be used to send a 16-bit value to the connected UART device.

Input Type Description
value value the 16-bit value to send

Note

It is recommended that the Serial UART is opened using default or custom options. Otherwise, it will use the default UART configuration as describe in the processor datasheet.

Send String

UART Send String

This can be used to send a string to the connected UART device.

Input Type Description
string value the string or pointer to string to send

Note

It is recommended that the Serial UART is opened using default or custom options. Otherwise, it will use the default UART configuration as describe in the processor datasheet.

Count Received Bytes

UART Count Received Bytes

This can be used to check how many bytes have been received in the buffer and is available for reading.

Return

Number of bytes in received and is available to read

Note

It is recommended that the Serial UART is opened using default or custom options. Otherwise, it will use the default UART configuration as describe in the processor datasheet.

Read Byte

UART Read Byte

This can be used to read a single byte received from the connected UART device.

Return

byte received

Note

  1. It is recommended that the Serial UART is opened using default or custom options. Otherwise, it will use the default UART configuration as describe in the processor datasheet.
  2. It is recommended to check the number of bytes available for reading before using this block

Read Value

UART Read Value

This can be used to read a 16-bit value received from the connected UART device.

Return

16-bit value received

Note

  1. It is recommended that the Serial UART is opened using default or custom options. Otherwise, it will use the default UART configuration as describe in the processor datasheet.
  2. It is recommended to check the number of bytes available for reading before using this block

Read String

UART Read String

This can be used to read a string received from the connected UART device.

Return

Pointer to the string received

Note

  1. It is recommended that the Serial UART is opened using default or custom options. Otherwise, it will use the default UART configuration as describe in the processor datasheet.
  2. It is recommended to check the number of bytes available for reading before using this block

Parse Integer

UART Parse Integer

This can be used to parse an integer from a string received from the connected UART device.

Return

16-bit value parsed from the string received

Note

  1. It is recommended that the Serial UART is opened using default or custom options. Otherwise, it will use the default UART configuration as describe in the processor datasheet.
  2. It is recommended to check the number of bytes available for reading before using this block

Read String Until

UART Read String Until

This can be used to read a string received from the connected UART device until the specified terminator.

UART Read String Until Dropdown

Return

Pointer to the string received

Note

  1. It is recommended that the Serial UART is opened using default or custom options. Otherwise, it will use the default UART configuration as describe in the processor datasheet.
  2. It is recommended to check the number of bytes available for reading before using this block

I2C Blocks

Open

I2C Open

This block can be used to open the I2C port using the selected speed.

I2C Open Dropdown

Input Type Description
speed dropdown the speed to use for the I2C port

Close

I2C Close

This block can be used to close the I2C port.

Note

It is required that the I2C is opened using Open I2C block before using this block.

Send Byte

I2C Send Byte

This can be used to send a single byte to the the register of a connected I2C device specified by the device ID.

Input Type Description
byte value the byte value to send
register value the register of the device to write into
device value the ID of the I2C device

Note

  1. It is required that the I2C is opened using Open I2C block before using this block.
  2. If value is a variable or 16-bit, only the low byte will be sent.

Send Value

I2C Send Value

This can be used to send a 16-bit value to the the register of a connected I2C device specified by the device ID.

Input Type Description
value value the 16-bit value to send
register value the register of the device to write into
device value the ID of the I2C device

Note

It is required that the I2C is opened using Open I2C block before using this block.

Send String

I2C Send String

This can be used to send a string to the the register of a connected I2C device specified by the device ID.

Input Type Description
string value the string or pointer to string to send
register value the register of the device to write into
device value the ID of the I2C device

Note

It is required that the I2C is opened using Open I2C block before using this block.

Read Byte

I2C Read Byte

This can be used to read a single byte from the register of the connected I2C device specified by the device ID.

Input Type Description
register value the register of the device to read from
device value the ID of the I2C device

Return

Byte read from the I2C device

Note

It is required that the I2C is opened using Open I2C block before using this block.

Read Value

I2C Read Value

This can be used to read a 16-bit value from the register of the connected I2C device specified by the device ID.

Input Type Description
register value the register of the device to read from
device value the ID of the I2C device

Return

16-bit value read from the I2C device

Note

It is required that the I2C is opened using Open I2C block before using this block.

Read Bytes

I2C Read Bytes

This can be used to read a fixed number of bytes from the register of the connected I2C device specified by the device ID.

Input Type Description
array dropdown the variable to store the array on
count integer the number of bytes/characters to read
register value the register of the device to read from
device value the ID of the I2C device

Note

It is required that the I2C is opened using Open I2C block before using this block.

1-Wire Blocks

Open

Perform Tasks if Successful

1-Wire Open and Perform Tasks if Successful

This block can be used to open 1-wire protocol using the selected pin and perform tasks if succesful

Input Type Description
pin dropdown the pin to use for 1-wire protocol
actions statement all the tasks to be performed by if operation is successful

Return Result

1-Wire Open and Return Result

This block can be used to open 1-wire protocol using the selected pin and return the result of the operation.

Input Type Description
pin dropdown the pin to use for 1-wire protocol

Return

True (1) if successful, otherwise False (0)

Read Byte

1-Wire Read Byte

This block can be used to read a single byte from the connected 1-wire device.

Input Type Description
pin dropdown the pin to use for 1-wire protocol

Note

It is required that the 1-wire protocol is successfully opened using Open 1-Wire block before using this block.

Read Value

1-Wire Read Value

This block can be used to read 16-bit value from the connected 1-wire device.

Input Type Description
pin dropdown the pin to use for 1-wire protocol

Note

It is required that the 1-wire protocol is successfully opened using Open 1-Wire block before using this block.

Send Byte

1-Wire Send Byte

This can be used to send a single byte to the the connected 1-wire device.

Input Type Description
byte value the byte value to send
pin dropdown the pin to use for 1-wire protocol

Note

  1. It is required that the 1-wire protocol is successfully opened using Open 1-Wire block before using this block.
  2. If value is a variable or 16-bit, only the low byte will be sent.

Send Value

1-Wire Send Value

This can be used to send a 16-bit value to the the connected 1-wire device.

Input Type Description
value value the 16-bit value to send
pin dropdown the pin to use for 1-wire protocol

Note

It is required that the 1-wire protocol is successfully opened using Open 1-Wire block before using this block.

Send Bytes

1-Wire Send Bytes

This can be used to send a fixed number of bytes to the the connected 1-wire device.

Input Type Description
count integer the number of bytes to send
array dropdown the variable containing the array
pin dropdown the pin to use for 1-wire protocol

Note

It is required that the 1-wire protocol is successfully opened using Open 1-Wire block before using this block.

Send Values

1-Wire Send Values

This can be used to send a fixed number of 16-bit values to the the connected 1-wire device.

Input Type Description
count integer the number of 16-bit values to send
array dropdown the variable containing the array
pin dropdown the pin to use for 1-wire protocol

Note

It is required that the 1-wire protocol is successfully opened using Open 1-Wire block before using this block.

Send String

1-Wire Send String

This can be used to send a string to the the connected 1-wire device.

Input Type Description
text value string or pointer to string to send
pin dropdown the pin to use for 1-wire protocol

Note

It is required that the 1-wire protocol is successfully opened using Open 1-Wire block before using this block.