I've been working with the HC-12 modules for about 2 days now and have set everything up, I've gotten the pins working and have tested the AT command which returns OK. However I haven't been able to send any data between them. I'm not sure if I'm doing something wrong but I just used this test code and it doesn't seem to be working. One of my boards is a Wifi Mkr 1010 and the other is just an Uno (uncloned)
I have no clue what to do since both compile without error and both the HC-12s work correctly and are set to the same settings when check with AT-RX. I can't get them to send data. Any help is appreciated! Thank you
make sure you don't open the the Serial monitor for that one
the MKR1010 is a 3.3V device. you might need a voltage adapter from the Tx of your HC12 to the Rx of the MKR1010. from the tech specs:
Please read: operating voltage is 3.3V
The microcontroller on the this board runs at 3.3V, which means that you must never apply more than 3.3V to its Digital and Analog pins. Care must be taken when connecting sensors and actuators to assure that this limit of 3.3V is never exceeded. Connecting higher voltage signals, like the 5V commonly used with the other Arduino boards, will damage the board.
I think the HC-12 can be powered by 3.3V (if there is enough current available), I'm not sure what HIGH looks like on the Tx Pin but if it's in line with he power supply then finger crossed it's not too late and that he HC-12 did not damage your Serial1 Rx pin on the MKR1010
Thanks for all the replies!
I have separated them farther apart while testing. I have also not begun the Serial on the Reciever end. Finally I changed the Serial.available and Serial.readString on the receiver to Serial1.available and Serial1.readString to interface with the hardware. They now work! Thank you!!