working example for HC-12 transceiver communicating with Arduino DUE

Hello all,

has anyone a working example for a HC-12 transceiver communicating with an Arduino DUE via hardware serial and not softwareserial? Can it be simply plugged to the RX and TX?

marcel00:
has anyone a working example for a HC-12 transceiver communicating with an Arduino DUE via hardware serial and not software serial?

Well top hit is:-

Just change the pins and use one of the Due’s hardware serial ports. Change the code so you talk to the hardware, something like Serial1 if you are using that port.

Can it be simply plugged to the RX and TX?

No, the Due is a 3V3 device and the example shows HC-12 being a 5V device. So from the TX pin of the HC-12 you need a 510R / 1K potential divider to cut the 5V down to 3V3. The RX pin can be connected directly to the Due.