Radio Frequency modules. Arduino. Bluetooth HC-06. FM

9.- Module with nRF24L01 and RFX2401C. 2.4 GHz. Modulation GFSK.

I like this module, I recommend it! :eight_spoked_asterisk:

- Arduino. Emitter code.

App --> Bluetooth Arduino HC-06 --> nRF234L01.

#include <nRF24L01.h>
#include <RF24.h>
#include <SPI.h>
 
RF24 rf24(9,8); // (CE, CSN)
 
const byte identificacion[6] = "00005";
char caracterfinal = '\n';
String texto;
 
void setup(void){
   rf24.begin();
   rf24.openWritingPipe(identificacion);
   rf24.stopListening();
}
void loop(){
  if(Serial.available()) {
    texto = Serial.readStringUntil(caracterfinal); // from App by Bluetooth
    Serial.println(texto);
    char *msg = texto.c_str();
    rf24.write(&texto, sizeof(texto)); // nRF234L01 sends texto.
  }
}

- Arduino. Receiver code.

#include <nRF24L01.h>
#include <RF24.h>
#include <SPI.h>
 
RF24 rf24(9,8); // (CE, CSN)
 
const byte identificacion[6] = "00005";
 
void setup(void){
   Serial.begin(9600);
   rf24.begin();
   rf24.openReadingPipe(1,identificacion);
   rf24.startListening();
}
 
void loop(){
  if (rf24.available()){
    char texto[32] = {0};
    rf24.read(&texto, sizeof(texto));
    Serial.println(texto);
  }
}

- Modulation FSK (Frequency Shift Keying):

To transmit a "1" use a Frequency. To transmit a "0" use another Frequency. The amplitude of Carrier is the same in the two states.

- Modulation MSK (Minimum Shift Keying):

Similar to FSK but the frequency changes occur at the carrier zero crossing points.

- Gaussian Filter.

  • It is a Low-Pass filter, it is applied to the pulses so that their flanks are smoother, this improves the bandwidth.

- Modulations GFSK and GMSK:

  • Similar to FSK and MSK but a Gaussian filter is applied to the pulses.