Jump to content

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

From Flowcode Help
m Text replacement - "width="10%" align="center" style="background-color:#D8C9D8;" align="center"" to "width="10%" align="center" class="mtx-class-macrohead""
m Text replacement - "width="90%" style="background-color:#D8C9D8; color:#4B008D;"" to "width="90%" class="mtx-class-macrohead""
 
(One intermediate revision by the same user not shown)
Line 73: Line 73:
|-
|-
| width="10%" align="center" class="mtx-class-macrohead" | [[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 92: Line 92:
|-
|-
| width="10%" align="center" class="mtx-class-macrohead" | [[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 116: Line 116:
|-
|-
| width="10%" align="center" class="mtx-class-macrohead" | [[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 130: Line 130:
|-
|-
| width="10%" align="center" class="mtx-class-macrohead" | [[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 154: Line 154:
|-
|-
| width="10%" align="center" class="mtx-class-macrohead" | [[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 173: Line 173:
|-
|-
| width="10%" align="center" class="mtx-class-macrohead" | [[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 192: Line 192:
|-
|-
| width="10%" align="center" class="mtx-class-macrohead" | [[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 211: Line 211:
|-
|-
| width="10%" align="center" class="mtx-class-macrohead" | [[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 235: Line 235:
{| class="mtx-class-macrotable wikitable"
{| 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