Instantiate a RadioConfig object with library defaults.
| feature | default value |
|---|---|
| RadioConfig.channel | 76 |
| RadioConfig.addressLength | 5 |
| RadioConfig.paLevel | PaLevel.Max |
| RadioConfig.lnaEnable | true |
| RadioConfig.crcLength | CrcLength.Bit16 |
| RadioConfig.dataRate | DataRate.Mbps1 |
| RadioConfig.payloadLength | 32 |
| RadioConfig.dynamicPayloads | false |
| RadioConfig.autoAck | 0x3F (enabled for pipes 0 - 5) |
| RadioConfig.ackPayloads | false |
| RadioConfig.askNoAck | false |
| RadioConfig.autoRetryDelay | 5 |
| RadioConfig.autoRetryCount | 15 |
| RadioConfig.txAddress | [0xE7, 0xE7, 0xE7, 0xE7, 0xE7] |
| RadioConfig.getRxAddress | See below table about Default RX addresses |
| RadioConfig.rxDr | true |
| RadioConfig.txDs | true |
| RadioConfig.txDf | true |
| pipe number | state | address |
|---|---|---|
| 0[^1] | closed | [0xE7, 0xE7, 0xE7, 0xE7, 0xE7] |
| 1 | open | [0xC2, 0xC2, 0xC2, 0xC2, 0xC2] |
| 2[^2] | closed | 0xC3 |
| 3[^2] | closed | 0xC4 |
| 4[^2] | closed | 0xC5 |
| 5[^2] | closed | 0xC6 |
[^1]: The RX address default value is the same as pipe 0 default TX address. [^2]: Remember, pipes 2 - 5 share the same 4 LSBytes as the address on pipe 1.
Enable or disable custom ACK payloads for auto-ACK packets.
ACK payloads require the RadioConfig.autoAck and RadioConfig.dynamicPayloads to be enabled. If ACK payloads are enabled, then this function also enables those features (for all pipes).
The address length.
This value is clamped to range [2, 5].
Allow disabling auto-ack per payload.
See askNoAck parameter for
RF24.send and RF24.write (WriteConfig.askNoAck).
Enable or disable auto-ACK feature.
The given value (in binary form) is used to control the auto-ack feature for each pipe. Bit 0 controls the feature for pipe 0. Bit 1 controls the feature for pipe 1. And so on.
To enable the feature for pipes 0, 1 and 4:
let config = new RadioConfig();
config.auto_ack = 0b010011;
If enabling the feature for any pipe other than 0, then the pipe 0 should also have the feature enabled because pipe 0 is used to transmit automatic ACK packets in RX mode.
The auto-retry feature's count set by
RadioConfig.setAutoRetries.
The auto-retry feature's delay set by
RadioConfig.setAutoRetries.
Set the channel (over the air frequency).
This value is clamped to range [0, 125]. The radio's frequency can be determined by the following equation:
frequency (in Hz) = channel + 2400
The Cyclical Redundancy Checksum (CRC) length.
See RF24.crcLength.
Enable or disable dynamically sized payloads.
Enabling this feature nullifies the utility of RadioConfig.payloadLength.
This feature is enabled automatically when enabling ACK payloads via RadioConfig.ackPayloads.
Enable or disable the chip's Low Noise Amplifier (LNA) feature.
This value may not be respected depending on the radio module used. Consult the radio's manufacturer for accurate details.
The payload length for statically sized payloads.
This value can not be set larger than 32 bytes.
See RF24.payloadLength().
Enable or disable the "RX Data Ready" event triggering the radio's IRQ.
See StatusFlags.rxDr.
Set the TX address.
Only pipe 0 can be used for TX operations (including auto-ACK packets during RX operations).
Enable or disable the "TX Data Failed" event triggering the radio's IRQ.
See StatusFlags.txDf.
Enable or disable the "TX Data Sent" event triggering the radio's IRQ.
See StatusFlags.txDs.
Close a RX pipe from receiving data.
This is only useful if pipe 1 should be closed instead of open (after constructing RadioConfig).
Get the address for a specified pipe set by RadioConfig.setRxAddress.
Is a specified RX pipe open (true) or closed (false)?
The value returned here is controlled by RadioConfig.setRxAddress (to open a pipe) and RadioConfig.closeRxPipe.
Set the auto-retry feature's delay and count parameters.
See RF24.setAutoRetries.
Set the address of a specified RX pipe for receiving data.
This does nothing if the given pipe is greater than 8.
For pipes 2 - 5, the 4 LSBytes are used from address set to pipe 1 with the
MSByte from the given address.
See also RadioConfig.txAddress.
An object to configure the radio.