IDE:1.6.8 running on Windows 7 machine.
Board: Nano.
HC-12 tx and rx on pins 1 and 2.
I cannot get the module to enter command mode.I wonder if this is because I need to have the HC-12 on different pins. (Is this some difficulty with trying to programme over the serial port?) The data light flashes on the Nano when I enter an AT code on the serial monitor but I do not receive a response.
Has anybody here any guidance, please?
Here is the code:
#include <SoftwareSerial.h>
SoftwareSerial mySerial(2, 1); // RX, TX
void setup() {
Serial.begin(9600);
Serial.println("Enter AT commands:");
mySerial.begin(9600);
}
void loop(){
if (mySerial.available()){
Serial.write(mySerial.read());
}
if (Serial.available()){
mySerial.write(Serial.read());
}
}