Complete the code to define MAVLink as a communication protocol.
mavlink = "[1]"
MAVLink is a communication protocol used to send messages between drones and ground stations.
Complete the code to show MAVLink message sending function.
def send_message(message): print("Sending [1] message")
The function prints that it is sending a MAVLink message, which is the protocol used.
Fix the error in the code to correctly import MAVLink library.
from pymavlink import [1]
The correct module to import from pymavlink for MAVLink communication is 'mavutil'.
Fill both blanks to create a MAVLink connection and send a heartbeat message.
from pymavlink import [1] connection = [2]('udp:127.0.0.1:14550') connection.mav.heartbeat_send()
Import 'mavutil' and use 'mavutil.mavlink_connection' to create the connection for sending MAVLink messages.
Fill all three blanks to receive a MAVLink message and print its type.
from pymavlink import [1] conn = [2]('udp:127.0.0.1:14550') msg = conn.recv_match(type='[3]', blocking=True) print(f"Received message type: {msg.get_type()}")
Import 'mavutil', create connection with 'mavutil.mavlink_connection', and receive 'HEARTBEAT' messages.