Radio Frequency HC-12. Arduino. Bluetooth HC-06 Home » Arduino Hc12 Library » Radio Frequency HC-12. Arduino. Bluetooth HC-06 Maybe your like Arduino Hc-sr04 Arduino Hc-sr04 Code Arduino Hc-sr04 Interrupt Arduino Hc-sr04 Led Arduino Hex String To Decimal Loading Radio Frequency HC-12. Arduino. Bluetooth HC-06 Tutorials and Guides hc-12, otg, radiofrequency, arduino, bluetooth Juan_Antonio June 28, 2022, 6:25pm 1 Hello friends, In this topic I discussed some radio frequency devices: https://community.appinventor.mit.edu/t/radio-frequency-modules-arduino-bluetooth-hc-06-fm/24346 I am now going to use two HC-12 modules with various updated codes. HC-12 works with radio frequencies but is not Bluetooth. With these modules it is possible to send information to more than 1600 meters (1 mile). 433 MHz Maximum transmit power: 20 dBm (100 mW), receive sensitivity: -129 dBm. 100 channels spaced 400 kHz. Range, about 1000 m, outdoor. Its parameters can be changed using AT commands: AT AT+RX AT+V AT+C021 AT+B9600 AT+FU3 4 modes of operation: FU1 FU2 FU3 (default, 1200bps ~ 1000 m, 115200bps ~ 100 m) FU4 (only small packets can be sent: max 60 bytes with the interval of 2 seconds. In this mode, range is increased to 1800m.) You can find many tutorials on this module on the internet: https://quadmeup.com/hc-12-433mhz-wireless-serial-communication-module-configuration/ DataSheet. In this test they achieve a range of more than a mile: https://www.youtube.com/watch?v=awOPJK5He28 In these examples we will use the FU3 mode and default settings. Let's go! 1 Like I want to build a simple app for controlling my esp8266 controlled drone, i tried searching but couldnt find any resource pls help Juan_Antonio Unlisted June 28, 2022, 6:25pm 2 Juan_Antonio June 28, 2022, 6:26pm 3 1.- With two Arduinos. Arduino_sender sends a continuous sequence of numbers to Arduino_receiver. We can see the information received on the Serial Monitor or on an OLED screen. U8g2 OLED Library. hc12_18928×531 140 KB arduino_sender.ino #include <SoftwareSerial.h> SoftwareSerial HC12(10,11); // TX to pin_10. RX to pin_11 of Arduino. int x = 100; unsigned long previousMillis = 0; const long interval = 1000; void setup() { HC12.begin(9600); } void loop() { unsigned long currentMillis = millis(); if (currentMillis - previousMillis >= interval) { previousMillis = currentMillis; x = x + 1; HC12.println(x); } } arduino_receiver.ino #include <SoftwareSerial.h> SoftwareSerial HC12(10, 11); // TX to pin_10. RX to pin_11 of Arduino. #include <U8g2lib.h> U8G2_SSD1306_128X32_UNIVISION_F_HW_I2C u8g2(U8G2_R0); void setup() { Serial.begin(9600); HC12.begin(9600); u8g2.begin(); u8g2.clearBuffer(); u8g2.setFont(u8g2_font_logisoso28_tr); u8g2.drawStr(30,31,"****"); u8g2.sendBuffer(); } void loop() { if(HC12.available()) { String texto = HC12.readStringUntil('\n'); Serial.println(texto); u8g2.clearBuffer(); u8g2.setFont(u8g2_font_logisoso28_tr); u8g2.drawStr(30,31,texto.c_str()); u8g2.sendBuffer(); } } Juan_Antonio June 28, 2022, 6:26pm 4 2.- App. Bluetooth. Arduino. App sends information via Bluetooth to the Arduino. Arduino transmits that information through the HC12. There is feedback from the Bluetooth module (but not from the receiving HC12). hc12_17928×748 215 KB arduino_bluetooth.ino #include <SoftwareSerial.h> SoftwareSerial HC12(10,11) ; // TX to pin_10. RX to pin_11 of Arduino. SoftwareSerial BT(2,3) ; // TX to pin_2. RX to pin_3 of Arduino. String texto; void setup() { HC12.begin(9600); BT.begin(9600); } void loop() { if(BT.available()) { texto = BT.readStringUntil('\n'); BT.println(texto); // Return to app HC12.println(texto); // HC-12 sends texto. } } arduino_receiver.ino [The same code from the previous post.] - App Inventor. p9AAi_bluetooth_radiofrecuencia_2.aia (3.7 KB) hc12_bluetooth748×1042 77.1 KB 1 Like Need someone to help my remote control Juan_Antonio June 28, 2022, 6:27pm 5 3.- App. OTG cable. UART CP2102. SerialOTG extension. App sends information to the UART via the OTG cable. The UART passes the information to the HC-12 and the HC-12 transmits it. We will use an OTG cable and a USB - UART (Rx/Tx) converter, CP2102. I will use the Serial component (from Connectivity) You can also use the extension: SerialOTG: https://github.com/rkl099/Appinventor-SerialOTG hc12_111006×320 246 KB Note that the HC-12 module is powered by the phone, so it cannot reach a great distance, perhaps 100m. hc12_5_oled900×571 262 KB - App Inventor. p10A_OTG_CP2102_HC12_2.aia (192.2 KB) hc12_19577×954 61.2 KB arduino_receiver.ino [The same code from the previous post.] Why the inventor does not work with the Arduino by connecting to the uart port ,,Note that there is a connection on the Serial USB Terminal application ??? How to start Serial with Bluetooth Juan_Antonio June 28, 2022, 6:27pm 6 4.- Bluetooth module and HC-12 directly connected.. App sends information to the Bluetooth module, which passes it to the HC-12 that transmits it. hc12_20854×748 219 KB - App Inventor. p9AAi_bluetooth_radiofrecuencia_3.aia (3.5 KB) hc12_21748×911 64.1 KB arduino_receiver.ino [The same code from the previous post.] Note in the schematic that only the information goes from the TXD of the Bluetooth module to the RX of the HC-12. There is no return of information, that's why I have not connected the RXD-TX cable. The assembly of the schematic lost the connection after a few seconds, curiously it was fixed by connecting the cables to the protoboard as indicated in the following image, perhaps it is due to a capacitive coupling problem. hc12_20B854×748 248 KB Juan_Antonio June 29, 2022, 12:04am 7 5.- Power supply. Power bank. To obtain a good range, it is convenient to power the HC-12 with an external voltage source that can supply 5 V and at least 0.5 W. hc12_22900×708 255 KB Power bank it is a portable device that can store electricity for charging phones, cameras, laptop computers, I tried to power the HC-12 with a Power bank, but it shut down after a few seconds. Power banks have an auto-off system when they supply little current, that's why it turns off. There are tricks to avoid it. Juan_Antonio June 29, 2022, 9:09am 8 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. hc12_15335×774 255 KB #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 Juan_Antonio June 29, 2022, 9:46am 9 7.- LORA. LONG RANGE. 15 km (9.3 miles). There are other devices with LORA technology that can reach 15 km. [Reyax RYLR896 Lora module] [40 $ aprox] (How to use LoRa with Arduino | LoRa Tutorial with Circuit Code and AT commands | Reyax RYLR896 - YouTube). SX1278 RA-01 (433 MHz) [5 $ aprox] https://www.youtube.com/watch?v=esKi_iWqb6M Juan_Antonio Listed June 29, 2022, 5:26pm 10 Tag » Arduino Hc12 Library Daar/HC-12: HC-12 Library For Arduino - GitHub RobertRol/SimpleHC12: Arduino Library For Simple RF ... - GitHub How To Communicate Two HC12 Module With Arduino HC12 Library Problem - Networking, Protocols, And Devices Arduino And HC-12 Long Range Wireless Communication Module Lora HC12 Module With Arduino Tutorial In हिंदी - YouTube Getting Startet With The HC-12 And Arduino For Wireless Communication HC12: Easy Arduino Wireless Communication Arduino Library For The HC12 RF Module - Kandi HC-12 Funkmodul - Wolles Elektronikkiste Understanding And Implementing The HC-12 Wireless Transceiver ... Module HC-12 - Robot Maker Arduino Wireless Communication - Bluetooth HC-11 HC-12