HC12 Test With Raspberry PI

Python Code

#!/usr/bin/python3
# -*- coding: utf-8 -*-

import serial
import time

ser = serial.Serial(
    port="/dev/ttyAMA0",
    baudrate=9600,
    parity=serial.PARITY_NONE,
    stopbits=serial.STOPBITS_ONE,
    bytesize=serial.EIGHTBITS,
    timeout=1  # seconds     # <-- HERE
)

while True:
    print("Sending...")
    ser.write("hello\n".encode())
    time.sleep(1)
Testing Setup