Jump to content

Component: SRF (WirelessThings) (SRF) (Wireless): Difference between revisions

From Flowcode Help
m Text replacement - "width="10%" align="center" style="background-color:#D8C9D8;"" to "width="10%" align="center" class="mtx-class-macrohead""
m Text replacement - "style="background-color:#EAE1EA;"" to "class="mtx-class-propfolder""
 
(2 intermediate revisions by the same user not shown)
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;" | '''ChangeHWBaud'''
| width="90%" class="mtx-class-macrohead" | '''ChangeHWBaud'''
|-
|-
| colspan="2" | Changes the hardware UART baud rate allowing for dynamic speed changes.  
| colspan="2" | Changes the hardware UART baud rate allowing for dynamic speed changes.  
Line 111: Line 111:
|-
|-
| 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;" | '''ReceiveByteArray'''
| width="90%" class="mtx-class-macrohead" | '''ReceiveByteArray'''
|-
|-
| colspan="2" | Receives an array of bytes and returns the number of bytes received. 
| colspan="2" | Receives an array of bytes and returns the number of bytes received. 
Line 140: Line 140:
|-
|-
| 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;" | '''ReceiveChar'''
| width="90%" class="mtx-class-macrohead" | '''ReceiveChar'''
|-
|-
| colspan="2" |  
| colspan="2" |  
Line 159: Line 159:
|-
|-
| 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;" | '''ReceiveFloat'''
| width="90%" class="mtx-class-macrohead" | '''ReceiveFloat'''
|-
|-
| colspan="2" | Attempts to receive a floating point number as ASCII characters and convert back into a numeric value. Note this function will receive until a timeout or a none numeric char is received, the none numeric char will be lost. 
| colspan="2" | Attempts to receive a floating point number as ASCII characters and convert back into a numeric value. Note this function will receive until a timeout or a none numeric char is received, the none numeric char will be lost. 
Line 183: Line 183:
|-
|-
| 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;" | '''ReceiveNumber'''
| width="90%" class="mtx-class-macrohead" | '''ReceiveNumber'''
|-
|-
| colspan="2" | Attempts to receive a number as ASCII characters and convert back into a numeric value. Note this function will receive until a timeout or a none numeric char is received, the none numeric char will be lost. 
| colspan="2" | Attempts to receive a number as ASCII characters and convert back into a numeric value. Note this function will receive until a timeout or a none numeric char is received, the none numeric char will be lost. 
Line 207: Line 207:
|-
|-
| 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;" | '''ReceiveString'''
| width="90%" class="mtx-class-macrohead" | '''ReceiveString'''
|-
|-
| colspan="2" | Send a string of data using the SRF Module 
| colspan="2" | Send a string of data using the SRF Module 
Line 231: Line 231:
|-
|-
| 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;" | '''SRFInitialise'''
| width="90%" class="mtx-class-macrohead" | '''SRFInitialise'''
|-
|-
| colspan="2" | Initialise the SRF Module. Activate device through 'enable' pin, and wake device to ensure it is not sleeping. 
| colspan="2" | Initialise the SRF Module. Activate device through 'enable' pin, and wake device to ensure it is not sleeping. 
Line 245: Line 245:
|-
|-
| 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;" | '''SendByteArray'''
| width="90%" class="mtx-class-macrohead" | '''SendByteArray'''
|-
|-
| colspan="2" | Transmits an array of bytes via the UART peripheral 
| colspan="2" | Transmits an array of bytes via the UART peripheral 
Line 269: Line 269:
|-
|-
| 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;" | '''SendChar'''
| width="90%" class="mtx-class-macrohead" | '''SendChar'''
|-
|-
| colspan="2" |  
| colspan="2" |  
Line 288: Line 288:
|-
|-
| 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;" | '''SendFloat'''
| width="90%" class="mtx-class-macrohead" | '''SendFloat'''
|-
|-
| colspan="2" | Sends out a floating point number as an ASCII String from the UART interface. 
| colspan="2" | Sends out a floating point number as an ASCII String from the UART interface. 
Line 307: Line 307:
|-
|-
| 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;" | '''SendNumber'''
| width="90%" class="mtx-class-macrohead" | '''SendNumber'''
|-
|-
| colspan="2" | Sends out a number as an ASCII String from the UART interface. 
| colspan="2" | Sends out a number as an ASCII String from the UART interface. 
Line 326: Line 326:
|-
|-
| 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;" | '''SendString'''
| width="90%" class="mtx-class-macrohead" | '''SendString'''
|-
|-
| colspan="2" | Send a string of data using the SRF Module 
| colspan="2" | Send a string of data using the SRF Module 
Line 345: Line 345:
|-
|-
| 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;" | '''Sleep'''
| width="90%" class="mtx-class-macrohead" | '''Sleep'''
|-
|-
| colspan="2" | Sets the SRF module to sleep mode. (Includes a 10mS delay to allow any data to finish sending) 
| colspan="2" | Sets the SRF module to sleep mode. (Includes a 10mS delay to allow any data to finish sending) 
Line 359: Line 359:
|-
|-
| 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;" | '''Wake'''
| width="90%" class="mtx-class-macrohead" | '''Wake'''
|-
|-
| colspan="2" | Wake the SRF module. Includes a 10ms delay to allow radio to wake. 
| colspan="2" | Wake the SRF module. Includes a 10ms delay to allow radio to wake. 
Line 374: Line 374:
|-
|-
| width="10%" align="center" class="mtx-class-macrohead" | [[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'''  
|-
|-
|-
|-
Line 387: Line 387:
| colspan="2" | Serial comms data rate specified in bits per second. 
| colspan="2" | Serial comms data rate specified in bits per second. 
|-
|-
| width="10%" align="center" style="background-color:#EAE1EA;" | [[File:Fc9-conn-icon.png]]
| width="10%" align="center" class="mtx-class-propfolder" | [[File:Fc9-conn-icon.png]]
| width="90%" style="background-color:#EAE1EA; color:#4B008D;" | Connections
| width="90%" class="mtx-class-propfolder" | Connections
|-
|-
|-
|-
Line 431: Line 431:
| colspan="2" |  
| colspan="2" |  
|-
|-
| width="10%" align="center" style="background-color:#EAE1EA;" | [[File:Fc9-conn-icon.png]]
| width="10%" align="center" class="mtx-class-propfolder" | [[File:Fc9-conn-icon.png]]
| width="90%" style="background-color:#EAE1EA; color:#4B008D;" | Simulation
| width="90%" class="mtx-class-propfolder" | Simulation
|-
|-
|-
|-

Latest revision as of 14:37, 13 July 2026

Author MatrixTSL
Version 6.6
Category Wireless


SRF (WirelessThings) component

The SRF is designed for wireless transmission and reception of serial data in an easy to use surface mounted module. It has an on-board balun and chip antenna, which can be detached for applications where an external antenna is required.

Version information

Library Version, Component Version, Date, Author, Info
6, 6.0, 29-01-25, MW, Added the following functions: 6, 6.0, 29-01-25, MW,ChangeHWBaud SendNumber ReceiveNumber SendFloat ReceiveFloat SendByteArray ReceiveByteArray


Detailed description

No detailed description exists yet for this component

Examples

No additional examples







Macro reference

ChangeHWBaud

ChangeHWBaud
Changes the hardware UART baud rate allowing for dynamic speed changes.  
- BYTE NewBaud
0=1200, 1=2400, 2=4800, 3=9600, 4=19200, 5=38400, 6=57600, 7=115200, 8=250000 
- VOID Return


ReceiveByteArray

ReceiveByteArray
Receives an array of bytes and returns the number of bytes received. 
- BYTE Data
Array to store the incoming data 
- UINT NumBytes
Maximum number of bytes to try and receive 
- BYTE Timeout
Max amount of time in ms to wait between bytes 
- BYTE Return


ReceiveChar

ReceiveChar
 
- BYTE Timeout
 
- INT Return


ReceiveFloat

ReceiveFloat
Attempts to receive a floating point number as ASCII characters and convert back into a numeric value. Note this function will receive until a timeout or a none numeric char is received, the none numeric char will be lost. 
- BYTE Timeout
Max time in ms to wait in between bytes 
- BOOL IgnoreData
0=Dont ignore any data, 1=Ignore any initial none numeric data 
- FLOAT Return


ReceiveNumber

ReceiveNumber
Attempts to receive a number as ASCII characters and convert back into a numeric value. Note this function will receive until a timeout or a none numeric char is received, the none numeric char will be lost. 
- BYTE Timeout
Max time in ms to wait in between bytes 
- BOOL IgnoreData
0=Dont ignore any data, 1=Ignore any initial none numeric data 
- LONG Return


ReceiveString

ReceiveString
Send a string of data using the SRF Module 
- BYTE Timeout
 
- BYTE NumBytes
 
- STRING Return


SRFInitialise

SRFInitialise
Initialise the SRF Module. Activate device through 'enable' pin, and wake device to ensure it is not sleeping. 
- VOID Return


SendByteArray

SendByteArray
Transmits an array of bytes via the UART peripheral 
- BYTE Data
Data to transmit 
- UINT NumBytes
Number of bytes to send from the array 
- VOID Return


SendChar

SendChar
 
- INT Char
 
- VOID Return


SendFloat

SendFloat
Sends out a floating point number as an ASCII String from the UART interface. 
- FLOAT Number
 
- VOID Return


SendNumber

SendNumber
Sends out a number as an ASCII String from the UART interface. 
- LONG Number
 
- VOID Return


SendString

SendString
Send a string of data using the SRF Module 
- STRING Data
 
- VOID Return


Sleep

Sleep
Sets the SRF module to sleep mode. (Includes a 10mS delay to allow any data to finish sending) 
- VOID Return


Wake

Wake
Wake the SRF module. Includes a 10ms delay to allow radio to wake. 
- VOID Return


Property reference

Properties
Sleep Mode (ATSM)
Defines which sleep mode will be used when calling the Sleep component macro. 
Baud Rate
Serial comms data rate specified in bits per second. 
Connections
Channel
Onboard UART peripheral to use to perform serial commands. Software mode available but not recommended for receive applications unless combined with a pin interrupt. 
Use TX
Selects if the Transmit pin is used by the component. Yes: The TX pin is active and used to transmit data for the UART. No: The TX pin is disabled and free to be used as general I/O. 
TX
Pin to be used for Transmit data 
TX Remap Pin
Allows the hardware transmit pin to be configured from a list of available pins based on your target device, 
Use RX
Selects if the Receive pin is used by the component. Yes: The RX pin is active and used to receive data for the UART. No: The RX pin is disabled and free to be used as general I/O. 
RX
Pin to be used for Receive data 
RX Remap Pin
Allows the hardware receive pin to be configured from a list of available pins based on your target device, 
Sleep
 
Simulation
Scope Traces
Selects if the scope traces are automatically generated or not 
Console Data
Selects if the console data is automatically generated or not 
Data Source
Simulation data source used to allow the component to connect to COM port hardware or the the data API components. 
COM Port
Lists all the current available COM port hardware on your PC. 

Component Source Code

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

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