Jump to content

Component: API UART Dummy (API Slave Devices): Difference between revisions

From Flowcode Help
No edit summary
m Text replacement - "width="90%" style="background-color:#D8C9D8; color:#4B008D;"" to "width="90%" class="mtx-class-macrohead""
 
(3 intermediate revisions by the same user not shown)
Line 70: Line 70:


===IOGetInputPin===
===IOGetInputPin===
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
{| class="mtx-class-macrotable wikitable"
|-
|-
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''IOGetInputPin'''
| width="90%" class="mtx-class-macrohead" | '''IOGetInputPin'''
|-
|-
| colspan="2" | Sets the selected digital pin to an input and reads the input state. 
| colspan="2" | Sets the selected digital pin to an input and reads the input state. 
Line 89: Line 89:


===IOSetOutputPin===
===IOSetOutputPin===
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
{| class="mtx-class-macrotable wikitable"
|-
|-
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''IOSetOutputPin'''
| width="90%" class="mtx-class-macrohead" | '''IOSetOutputPin'''
|-
|-
| colspan="2" | Sets the selected digital pin to an output and assigns the output state. 
| colspan="2" | Sets the selected digital pin to an output and assigns the output state. 
Line 113: Line 113:


===Initialise===
===Initialise===
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
{| class="mtx-class-macrotable wikitable"
|-
|-
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''Initialise'''
| width="90%" class="mtx-class-macrohead" | '''Initialise'''
|-
|-
| colspan="2" | Initialise the comms to the Arduino board ready for commands to be sent. 
| colspan="2" | Initialise the comms to the Arduino board ready for commands to be sent. 
Line 127: Line 127:


===UARTBaud===
===UARTBaud===
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
{| class="mtx-class-macrotable wikitable"
|-
|-
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''UARTBaud'''
| width="90%" class="mtx-class-macrohead" | '''UARTBaud'''
|-
|-
| colspan="2" | Control the communications rate of the UART module 
| colspan="2" | Control the communications rate of the UART module 
Line 151: Line 151:


===UARTCheckRX===
===UARTCheckRX===
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
{| class="mtx-class-macrotable wikitable"
|-
|-
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''UARTCheckRX'''
| width="90%" class="mtx-class-macrohead" | '''UARTCheckRX'''
|-
|-
| colspan="2" | Check to see if the UART module has received any data 
| colspan="2" | Check to see if the UART module has received any data 
Line 170: Line 170:


===UARTInitialise===
===UARTInitialise===
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
{| class="mtx-class-macrotable wikitable"
|-
|-
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''UARTInitialise'''
| width="90%" class="mtx-class-macrohead" | '''UARTInitialise'''
|-
|-
| colspan="2" | Initialise the UART module ready for communications 
| colspan="2" | Initialise the UART module ready for communications 
Line 189: Line 189:


===UARTReceive===
===UARTReceive===
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
{| class="mtx-class-macrotable wikitable"
|-
|-
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''UARTReceive'''
| width="90%" class="mtx-class-macrohead" | '''UARTReceive'''
|-
|-
| colspan="2" | Receives a data byte from the UART. Recommend calling the UARTCheckRx function first to ensure data is available. 
| colspan="2" | Receives a data byte from the UART. Recommend calling the UARTCheckRx function first to ensure data is available. 
Line 208: Line 208:


===UARTSend===
===UARTSend===
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
{| class="mtx-class-macrotable wikitable"
|-
|-
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''UARTSend'''
| width="90%" class="mtx-class-macrohead" | '''UARTSend'''
|-
|-
| colspan="2" | Send a byte via the UART module 
| colspan="2" | Send a byte via the UART module 
Line 233: Line 233:
==Property reference==
==Property reference==


{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
{| class="mtx-class-macrotable wikitable"
|-
|-
| width="10%" align="center" style="background-color:#D8C9D8;" | [[File:Fc9-prop-icon.png]]
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-prop-icon.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''Properties'''  
| width="90%" class="mtx-class-macrohead" | '''Properties'''  
|-
|-
|}
|}

Latest revision as of 14:22, 13 July 2026

Author Matrix TSL
Version 2.0
Category API Slave Devices


API UART Dummy component

Connects to an Arduino Mega running the API Firmware allowing the board to become a slave to the Flowcode Embedded simulation or Flowcode App Developer. Supports: Digital IO / ADC / I2C / SPI / UART / PWM See Flowcode Help Wiki for firmware.

Component Source Code

Please click here to download the component source project: FC_Comp_Source_API_UART_Dummy.fcfx

Please click here to view the component source code (Beta): FC_Comp_Source_API_UART_Dummy.fcfx

Detailed description

No detailed description exists yet for this component

Examples

No additional examples






Macro reference

IOGetInputPin

IOGetInputPin
Sets the selected digital pin to an input and reads the input state. 
- BYTE Pin
Range: 0-19 
- BOOL Return


IOSetOutputPin

IOSetOutputPin
Sets the selected digital pin to an output and assigns the output state. 
- BYTE Pin
Range: 0-53 
- BOOL State
Range: 0-1 
- VOID Return


Initialise

Initialise
Initialise the comms to the Arduino board ready for commands to be sent. 
- VOID Return


UARTBaud

UARTBaud
Control the communications rate of the UART module 
- BYTE Channel
Channel Index: Range 0 - UART Bus Count - 1 
- BYTE Rate
0=1200, 1=2400, 2=4800, 3=9600, 4=19200, 5=38400, 6=57600, 7=115200 
- VOID Return


UARTCheckRX

UARTCheckRX
Check to see if the UART module has received any data 
- BYTE Channel
Channel Index: Range 0 - UART Bus Count - 1 
- BYTE Return


UARTInitialise

UARTInitialise
Initialise the UART module ready for communications 
- BYTE Channel
Channel Index: Range 0 - UART Bus Count - 1 
- VOID Return


UARTReceive

UARTReceive
Receives a data byte from the UART. Recommend calling the UARTCheckRx function first to ensure data is available. 
- BYTE Channel
Channel Index: Range 0 - UART Bus Count - 1 
- BYTE Return


UARTSend

UARTSend
Send a byte via the UART module 
- BYTE Channel
Channel Index: Range 0 - UART Bus Count - 1 
- BYTE Data
Data Byte to send. Range: 0-255 
- VOID Return


Property reference

Properties