Difference between revisions of "Component: RF 2.4GHz (nRF24L01) (Wireless)"

From Flowcode Help
Jump to navigationJump to search
 
(4 intermediate revisions by the same user not shown)
Line 14: Line 14:
 
==RF 2.4GHz component==
 
==RF 2.4GHz component==
 
A simple RF communications module based on the 2.4GHz nRF24L01 modules.
 
A simple RF communications module based on the 2.4GHz nRF24L01 modules.
 +
 +
==Component Pack==
 +
 +
COMMSB
  
 
==Detailed description==
 
==Detailed description==
 +
 +
 +
 +
 +
 +
 +
 +
 +
 +
  
 
''No detailed description exists yet for this component''
 
''No detailed description exists yet for this component''
  
 
==Examples==
 
==Examples==
 +
 +
 +
 +
 +
 +
 +
 +
 +
 +
  
  
Line 269: Line 293:
 
|-
 
|-
 
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-u16-icon.png]] - UINT
 
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-u16-icon.png]] - UINT
| width="90%" style="border-top: 2px solid #000;" | ''Return''
 
|}
 
 
 
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 
|-
 
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
 
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''AutoMoveToPositionInt'''
 
|-
 
| colspan="2" | Automatically moves towards the new 16-bit position at a fixed rate determined by the AutoMoveSpeed. 
 
|-
 
|-
 
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
 
| width="90%" | Channel
 
|-
 
| colspan="2" | The channel to assign the new position. Range: 0-7 
 
|-
 
| width="10%" align="center" | [[File:Fc9-u16-icon.png]] - UINT
 
| width="90%" | Position
 
|-
 
| colspan="2" | Position to automatically move to. Range: 0-65535 
 
|-
 
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID
 
| width="90%" style="border-top: 2px solid #000;" | ''Return''
 
|}
 
 
 
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 
|-
 
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
 
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''Initialise'''
 
|-
 
| colspan="2" | Sets up the servo motor interrupts 
 
|-
 
|-
 
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID
 
| width="90%" style="border-top: 2px solid #000;" | ''Return''
 
|}
 
 
 
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 
|-
 
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
 
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''WriteLEDs'''
 
|-
 
| colspan="2" | Allows control of all 8-LEDs on the front of the Formula Flowcode. 
 
|-
 
|-
 
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
 
| width="90%" | LED_Byte
 
|-
 
| colspan="2" |  
 
|-
 
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID
 
| width="90%" style="border-top: 2px solid #000;" | ''Return''
 
|}
 
 
 
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 
|-
 
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
 
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''Initialise'''
 
|-
 
| colspan="2" | Starts up the formula flowcode PWM for motor control and performs the wait for button press 
 
|-
 
|-
 
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID
 
 
| width="90%" style="border-top: 2px solid #000;" | ''Return''
 
| width="90%" style="border-top: 2px solid #000;" | ''Return''
 
|}
 
|}
Line 348: Line 305:
 
| width="10%" align="center" style="background-color:#D8C9D8;" | [[File:Fc9-prop-icon.png]]
 
| width="10%" align="center" style="background-color:#D8C9D8;" | [[File:Fc9-prop-icon.png]]
 
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''Properties'''  
 
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''Properties'''  
 +
|-
 +
|-
 +
| width="10%" align="center" style="background-color:#EAE1EA;" | [[File:Fc9-conn-icon.png]]
 +
| width="90%" style="background-color:#EAE1EA; color:#4B008D;" | RF Settings
 
|-
 
|-
 
|-
 
|-
Line 355: Line 316:
 
| colspan="2" | Sets the RF channel from 0 - 127 = 2.4000GHz - 2.525GHz Both the transmitter and receiver should be on the same channel to receive data.  
 
| colspan="2" | Sets the RF channel from 0 - 127 = 2.4000GHz - 2.525GHz Both the transmitter and receiver should be on the same channel to receive data.  
 
|-
 
|-
| width="10%" align="center" style="background-color:#D8C9D8;" | [[File:Fc9-conn-icon.png]]
+
| width="10%" align="center" style="background-color:#EAE1EA;" | [[File:Fc9-conn-icon.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''Connections'''
+
| width="90%" style="background-color:#EAE1EA; color:#4B008D;" | Connections
 
|-
 
|-
 
|-
 
|-
Line 394: Line 355:
 
| colspan="2" | Chip enable, configures RX or TX mode 
 
| colspan="2" | Chip enable, configures RX or TX mode 
 
|-
 
|-
| width="10%" align="center" style="background-color:#D8C9D8;" | [[File:Fc9-conn-icon.png]]
+
| width="10%" align="center" style="background-color:#EAE1EA;" | [[File:Fc9-conn-icon.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''Simulations'''
+
| width="90%" style="background-color:#EAE1EA; color:#4B008D;" | Simulation
 
|-
 
|-
 
|-
 
|-

Latest revision as of 17:27, 9 November 2022

Author Matrix Ltd.
Version 2.0
Category Wireless


RF 2.4GHz component

A simple RF communications module based on the 2.4GHz nRF24L01 modules.

Component Pack

COMMSB

Detailed description

No detailed description exists yet for this component

Examples

No additional examples


Downloadable macro reference

Fc9-comp-macro.png ReadRxByte
Reads a single byte back from the local Rx buffer. 
Fc9-u8-icon.png - BYTE Index
Byte to read, range 0 - 31 
Fc9-u8-icon.png - BYTE Return


Fc9-comp-macro.png WriteTxByte
Reads a single byte to the local Tx buffer. 
Fc9-u8-icon.png - BYTE Index
Byte to read, range 0 - 31 
Fc9-u8-icon.png - BYTE Value
 
Fc9-void-icon.png - VOID Return


Fc9-comp-macro.png FlushRx
Tells the RF module to flush the contents of the receive buffer. Returns the status from sending the command. 
Fc9-u8-icon.png - BYTE Return


Fc9-comp-macro.png ReadRxFifo
Reads the Rx FIFO buffer into a local buffer. Use the ReadBuffer macro to collect the individual data bytes. 
Fc9-u8-icon.png - BYTE NumBytes
Number of bytes to try and read from the FIFO Range 1-32 
Fc9-void-icon.png - VOID Return


Fc9-comp-macro.png WriteTxFifo
Writes the contents of the local Tx buffer to the Transmit FIFO. 
Fc9-u8-icon.png - BYTE NumBytes
Number of bytes to write to the FIFO, Range 1 - 32 
Fc9-void-icon.png - VOID Return


Fc9-comp-macro.png FlushTx
Tells the RF module to flush the contents of the transmit buffer. Returns the status from sending the command. 
Fc9-u8-icon.png - BYTE Return


Fc9-comp-macro.png CheckRX
Check the Rx FIFO status register for any new data. Returns 0 = No data Returns 1 = New data available 
Fc9-u8-icon.png - BYTE Return


Fc9-comp-macro.png ReadRegister
Reads a single bytes from the selected register. Directly returns the value read back from the register. 
Fc9-u8-icon.png - BYTE Reg
Register address to access 
Fc9-u8-icon.png - BYTE Return


Fc9-comp-macro.png SetTxMode
Sets the module up ready to transmit data. 
Fc9-u8-icon.png - BYTE PA0
Pipe Address Bytes 
Fc9-u8-icon.png - BYTE PA1
Pipe Address Bytes 
Fc9-u8-icon.png - BYTE PA2
Pipe Address Bytes 
Fc9-u8-icon.png - BYTE PA3
Pipe Address Bytes 
Fc9-u8-icon.png - BYTE PA4
Pipe Address Bytes 
Fc9-void-icon.png - VOID Return


Fc9-comp-macro.png SetRxMode
Sets the module up ready to receive data. 
Fc9-u8-icon.png - BYTE PA0
Pipe Address Bytes 
Fc9-u8-icon.png - BYTE PA1
Pipe Address Bytes 
Fc9-u8-icon.png - BYTE PA2
Pipe Address Bytes 
Fc9-u8-icon.png - BYTE PA3
Pipe Address Bytes 
Fc9-u8-icon.png - BYTE PA4
Pipe Address Bytes 
Fc9-void-icon.png - VOID Return


Fc9-comp-macro.png WriteRegister
Writes a single byte to the selected register. Returns the status of the write command. 
Fc9-u8-icon.png - BYTE Reg
Register address to access 
Fc9-u8-icon.png - BYTE Value
 
Fc9-u8-icon.png - BYTE Return


Fc9-comp-macro.png Initialise
Starts up and configures the RF module ready for use. The macro will return a value greater then 0 if the module has been started correctly, otherwise the macro will return a 0. 
Fc9-u16-icon.png - UINT Return



Property reference

Fc9-prop-icon.png Properties
Fc9-conn-icon.png RF Settings
Fc9-type-21-icon.png RF Channel
Sets the RF channel from 0 - 127 = 2.4000GHz - 2.525GHz Both the transmitter and receiver should be on the same channel to receive data.  
Fc9-conn-icon.png Connections
Fc9-type-16-icon.png Channel
SPI Channel selector 
Fc9-type-16-icon.png Prescale
Prescale option selector 
Fc9-type-5-icon.png MOSI
SPI Data Out Pin SDO - Also Known as Master Out Slave In (MOSI) when used in Master mode. 
Fc9-type-5-icon.png MISO
SPI Data In Pin SDI - Also Known as Master In Slave Out (MISO) when used in Master mode. 
Fc9-type-5-icon.png CLK
SPI Clock Pin CLK - The Clock signal is driven by the SPI master. 
Fc9-type-5-icon.png CS / SS
Chip Select / Slave Select Pin Master Mode: General purpose output pin used to select the remote SPI device. Slave Mode: Hardware chip select pin input used to select the SPI device.  
Fc9-type-5-icon.png CE Pin
Chip enable, configures RX or TX mode 
Fc9-conn-icon.png Simulation
Fc9-type-10-icon.png Label
Label used to help identify the component on the panel. 
Fc9-type-7-icon.png Scope Traces
Selects if the scope traces are automatically generated or not 
Fc9-type-7-icon.png Console Data
Selects if the console data is automatically generated or not 
Fc9-type-16-icon.png API