Hey, I just hooked up my HC12 module (not sure if it's a clone), to the Serial1 port of my Arduino mega.
Vcc - 5v
Gnd - Gnd
Rx - TX1
TX - RX1
Set - GND (for AT command mode)
void setup() {
Serial.begin(9600);
Serial1.begin(9600); // HC-12
}
void loop() {
if (Serial1.available()) {
Serial.write(Serial1.read());
}
if (Serial.available()) {
Serial1.write(Serial.read());
}
}
When I type "AT" into my serial monitor, i get
"ERROR
ERROR
ERROR"
I've tried changing the "no line ending", "new line", "Carriage return", "both new line and CR", but i get the same response each time.
I'm worried about trying to change the baud rate because from a previous post (Solved! HC-12 ERROR) one person had trouble getting it working again. But i'm assuming the baud rate (9600) is working because the "ERROR" msg is coming back fine.
i've tried "AT", and "AT+", same results