Hi All,
I have been working on a project where we want to use an HC-12 to send data to another device. After some tinkering, we get the device to start up and work. Just to test the protocols, we make up a message, print this message on the serial monitor, and then transmit the same message over the HC-12. We were getting gibberish often on the receiver side, so we thought it must be some issue with antennas, timing in the transmit, etc... Then we actually checked the monitor for the transmitter side, and this is what was printed:
Now, this is weird.. Here is the code for the loop function:
byte Message[15] = " RM+RGB ";
const int Sendd = 0x38;
Message[0] = Sendd;
int ID = 0x0;
int R = 0x0;
int G = 0x60;
int B = 0x60;
Message[7] = ID;
Message[8] = R;
Message[9] = G;
Message[10] = B;
for (int i = 0; i<Max_Transfer_Size; i++){
outgoingBuffer[i] = Message[i]; //copy
}
Serial.println(outgoingBuffer);
bool succ = HandleCommsBasic();
Does anyone have any clue why the message gets messed up? My USB wire is but a foot long, and is shielded. It could be that the transmission interferes with the wire, and messes up the bits. Anyone have any idea?
Thanks in advance