hello,
im trying to communicate between 2 arduinos using HC-12 modules.
i connected them well like the picture above with the diode and the capacitor, where my arduino is my power supply.
i have a simple code for message transmit and recieve. same code for both arduinos.
messages wont send.
this is the code:
any suggestions what im doing wrong?
Mod's note:
Please don't hijack other member's thread.
This thread was split from HC-12 Nothing showing up in Serial monitor.
im trying to communicate between 2 arduinos using HC-12 modules.
i connected them well like the picture above with the diode and the capacitor, where my arduino is my power supply.
i have a simple code for message transmit and recieve. same code for both arduinos.
messages wont send.
this is the code:
C:
#include <SoftwareSerial.h>
SoftwareSerial mySerial(2, 3); //RX, TX
void setup() {
Serial.begin(9600);
mySerial.begin(9600);
}
void loop() {
if(Serial.available() > 0){//Read from serial monitor and send over HC-12
String input = Serial.readString();
mySerial.println(input);
}
if(mySerial.available() > 1){//Read from HC-12 and send to serial monitor
String input = mySerial.readString();
Serial.println(input);
}
delay(20);
}
Mod's note:
Please don't hijack other member's thread.
This thread was split from HC-12 Nothing showing up in Serial monitor.
Last edited by a moderator: