6.- More range. FU4 mode. AT commands.
- The greatest range 1800 m (1.1 mile) is obtained in FU4 mode.
To configure it in that mode, we connect the SET terminal to pin 9 of the Arduino and load the following code.
#include <SoftwareSerial.h>
SoftwareSerial HC12(10,11); // TX to pin_10. RX to pin_11 of Arduino.
void setup() {
Serial.begin(9600); // 9600 viene por defecto. 1200 en modo FU4
HC12.begin(9600); // 9600 viene por defecto. 1200 en modo FU4
pinMode(9, OUTPUT); // SET to pin_9 of Arduino.
}
void loop() {
if(Serial.available()) {
String command = Serial.readStringUntil('\n');
digitalWrite(9, LOW);
Serial.println(command);
HC12.print(command);
digitalWrite(9, HIGH);
}
if (HC12.available()){
String retorno = HC12.readStringUntil('\n');
Serial.println(retorno);
}
}
AT
AT+RX
AT+FU4
AT+RX
-
Automatically a speed of 1200 bauds is established, for which you will have to change some codes and the speed of the Serial Monitor.
-
Baud rate change on HC-05 and HC-06:
https://community.appinventor.mit.edu/t/hc-05-bluetooth-arduino-change-baud-rate-38400-send-random-to-app/44170

