kopia lustrzana https://github.com/jgromes/RadioLib
[RF69] Swapped frequency deviation and rx bandwdith in begin method
rodzic
3bb70ff361
commit
32602307b7
|
@ -33,8 +33,8 @@ void setup() {
|
|||
Serial.print(F("[RF69] Initializing ... "));
|
||||
// carrier frequency: 434.0 MHz
|
||||
// bit rate: 48.0 kbps
|
||||
// Rx bandwidth: 125.0 kHz
|
||||
// frequency deviation: 50.0 kHz
|
||||
// Rx bandwidth: 125.0 kHz
|
||||
// output power: 13 dBm
|
||||
// sync word: 0x2D01
|
||||
int state = rf.begin();
|
||||
|
|
|
@ -29,8 +29,8 @@ void setup() {
|
|||
Serial.print(F("[RF69] Initializing ... "));
|
||||
// carrier frequency: 434.0 MHz
|
||||
// bit rate: 48.0 kbps
|
||||
// Rx bandwidth: 125.0 kHz
|
||||
// frequency deviation: 50.0 kHz
|
||||
// Rx bandwidth: 125.0 kHz
|
||||
// output power: 13 dBm
|
||||
// sync word: 0x2D01
|
||||
int state = rf.begin();
|
||||
|
|
|
@ -31,8 +31,8 @@ void setup() {
|
|||
Serial.print(F("[RF69] Initializing ... "));
|
||||
// carrier frequency: 434.0 MHz
|
||||
// bit rate: 48.0 kbps
|
||||
// Rx bandwidth: 125.0 kHz
|
||||
// frequency deviation: 50.0 kHz
|
||||
// Rx bandwidth: 125.0 kHz
|
||||
// output power: 13 dBm
|
||||
// sync word: 0x2D01
|
||||
int state = rf.begin();
|
||||
|
|
|
@ -29,8 +29,8 @@ void setup() {
|
|||
Serial.print(F("[RF69] Initializing ... "));
|
||||
// carrier frequency: 434.0 MHz
|
||||
// bit rate: 48.0 kbps
|
||||
// Rx bandwidth: 125.0 kHz
|
||||
// frequency deviation: 50.0 kHz
|
||||
// Rx bandwidth: 125.0 kHz
|
||||
// output power: 13 dBm
|
||||
// sync word: 0x2D01
|
||||
int state = rf.begin();
|
||||
|
@ -104,7 +104,7 @@ void loop() {
|
|||
// you can also read received data as byte array
|
||||
/*
|
||||
byte byteArr[8];
|
||||
int state = lora.receive(byteArr, 8);
|
||||
int state = lora.readData(byteArr, 8);
|
||||
*/
|
||||
|
||||
if (state == ERR_NONE) {
|
||||
|
|
|
@ -41,8 +41,8 @@ void setup() {
|
|||
Serial.print(F("[RF69] Initializing ... "));
|
||||
// carrier frequency: 434.0 MHz
|
||||
// bit rate: 48.0 kbps
|
||||
// Rx bandwidth: 125.0 kHz
|
||||
// frequency deviation: 50.0 kHz
|
||||
// Rx bandwidth: 125.0 kHz
|
||||
// output power: 13 dBm
|
||||
// sync word: 0x2D01
|
||||
int state = rf1.begin();
|
||||
|
@ -58,11 +58,11 @@ void setup() {
|
|||
Serial.print(F("[RF69] Initializing ... "));
|
||||
// carrier frequency: 868.0 MHz
|
||||
// bit rate: 300.0 kbps
|
||||
// Rx bandwidth: 250.0 kHz
|
||||
// frequency deviation: 60.0 kHz
|
||||
// Rx bandwidth: 250.0 kHz
|
||||
// output power: 17 dBm
|
||||
// sync word: 0x2D01
|
||||
state = rf2.begin(868.0, 300.0, 250.0, 60.0, 17);
|
||||
state = rf2.begin(868.0, 300.0, 60.0, 250.0, 17);
|
||||
if (state == ERR_NONE) {
|
||||
Serial.println(F("success!"));
|
||||
} else {
|
||||
|
|
|
@ -31,8 +31,8 @@ void setup() {
|
|||
Serial.print(F("[RF69] Initializing ... "));
|
||||
// carrier frequency: 434.0 MHz
|
||||
// bit rate: 48.0 kbps
|
||||
// Rx bandwidth: 125.0 kHz
|
||||
// frequency deviation: 50.0 kHz
|
||||
// Rx bandwidth: 125.0 kHz
|
||||
// output power: 13 dBm
|
||||
// sync word: 0x2D01
|
||||
int state = rf.begin();
|
||||
|
|
|
@ -29,8 +29,8 @@ void setup() {
|
|||
Serial.print(F("[RF69] Initializing ... "));
|
||||
// carrier frequency: 434.0 MHz
|
||||
// bit rate: 48.0 kbps
|
||||
// Rx bandwidth: 125.0 kHz
|
||||
// frequency deviation: 50.0 kHz
|
||||
// Rx bandwidth: 125.0 kHz
|
||||
// output power: 13 dBm
|
||||
// sync word: 0x2D01
|
||||
int state = rf.begin();
|
||||
|
|
|
@ -31,8 +31,8 @@ void setup() {
|
|||
Serial.print(F("[RF69] Initializing ... "));
|
||||
// carrier frequency: 434.0 MHz
|
||||
// bit rate: 48.0 kbps
|
||||
// Rx bandwidth: 125.0 kHz
|
||||
// frequency deviation: 50.0 kHz
|
||||
// Rx bandwidth: 125.0 kHz
|
||||
// output power: 13 dBm
|
||||
// sync word: 0x2D01
|
||||
int state = rf.begin();
|
||||
|
|
|
@ -35,8 +35,8 @@ void setup() {
|
|||
Serial.print(F("[RF69] Initializing ... "));
|
||||
// carrier frequency: 434.0 MHz
|
||||
// bit rate: 48.0 kbps
|
||||
// Rx bandwidth: 125.0 kHz
|
||||
// frequency deviation: 50.0 kHz
|
||||
// Rx bandwidth: 125.0 kHz
|
||||
// output power: 13 dBm
|
||||
// sync word: 0x2D01
|
||||
int state = rf.begin();
|
||||
|
@ -63,7 +63,7 @@ void setup() {
|
|||
/*
|
||||
byte byteArr[] = {0x01, 0x23, 0x45, 0x56,
|
||||
0x78, 0xAB, 0xCD, 0xEF};
|
||||
state = rf.transmit(byteArr, 8);
|
||||
state = rf.startTransmit(byteArr, 8);
|
||||
*/
|
||||
}
|
||||
|
||||
|
@ -121,11 +121,11 @@ void loop() {
|
|||
// 256 characters long
|
||||
transmissionState = rf.startTransmit("Hello World!");
|
||||
|
||||
// you can also transmit byte array up to 256 bytes long
|
||||
// you can also transmit byte array up to 64 bytes long
|
||||
/*
|
||||
byte byteArr[] = {0x01, 0x23, 0x45, 0x56,
|
||||
0x78, 0xAB, 0xCD, 0xEF};
|
||||
int state = rf.transmit(byteArr, 8);
|
||||
int state = rf.startTransmit(byteArr, 8);
|
||||
*/
|
||||
|
||||
// we're ready to send more packets,
|
||||
|
|
|
@ -12,7 +12,7 @@ RF69::RF69(Module* module) : PhysicalLayer(RF69_FREQUENCY_STEP_SIZE, RF69_MAX_PA
|
|||
_syncWordLength = 2;
|
||||
}
|
||||
|
||||
int16_t RF69::begin(float freq, float br, float rxBw, float freqDev, int8_t power) {
|
||||
int16_t RF69::begin(float freq, float br, float freqDev, float rxBw, int8_t power) {
|
||||
// set module properties
|
||||
_mod->init(RADIOLIB_USE_SPI);
|
||||
Module::pinMode(_mod->getIrq(), INPUT);
|
||||
|
|
|
@ -455,15 +455,15 @@ class RF69: public PhysicalLayer {
|
|||
|
||||
\param br Bit rate to be used in kbps. Defaults to 48.0 kbps.
|
||||
|
||||
\param rxBw Receiver bandwidth in kHz. Defaults to 125.0 kHz.
|
||||
|
||||
\param freqDev Frequency deviation from carrier frequency in kHz Defaults to 50.0 kHz.
|
||||
|
||||
\param rxBw Receiver bandwidth in kHz. Defaults to 125.0 kHz.
|
||||
|
||||
\param power Output power in dBm. Defaults to 13 dBm.
|
||||
|
||||
\returns \ref status_codes
|
||||
*/
|
||||
int16_t begin(float freq = 434.0, float br = 48.0, float rxBw = 125.0, float freqDev = 50.0, int8_t power = 13);
|
||||
int16_t begin(float freq = 434.0, float br = 48.0, float freqDev = 50.0, float rxBw = 125.0, int8_t power = 13);
|
||||
|
||||
/*!
|
||||
\brief Reset method. Will reset the chip to the default state using RST pin.
|
||||
|
|
Ładowanie…
Reference in New Issue