diff --git a/Python Projects/controlling drone using python/listen.py b/Python Projects/controlling drone using python/listen.py new file mode 100644 index 00000000..8228b93d --- /dev/null +++ b/Python Projects/controlling drone using python/listen.py @@ -0,0 +1,11 @@ +from pymavlink import mavutil + +the_connection=mavutil.mavlink_connection('udpin:localhost:14550') + +the_connection.wait_heartbeat() +print("Heartbeat from system (system %u component %u)" % + (the_connection.target_system, the_connection.target_component)) + +while True: + message=the_connection.recv_match(blocking=True) + print(message) \ No newline at end of file