Thank you for the kind and informative responses.
SCR_ENABLE is at 1.
I am working on adding out of the ordinary sensors and actuators to drones. I have successfully made the drone “talk” with an esp32 via i2c and vice versa. I am currently using MAV_CMD_DO_AUX_FUNCTION, but this is very limiting. I would love to send more data, I saw that MAV_CMD_DO_SEND_SCRIPT_MESSAGE allows for 1 int and 3 floats.
I am testing this with pymavlink.
The code is as follows:
import time
import sys
from pymavlink import mavutil
serial_port = "COM7" # Replace with your serial port
##
### Connect to Mission Planner
the_connection = mavutil.mavlink_connection(serial_port, baudrate=57600)
# Wait for the first heartbeat
# This sets the system and component ID of remote system for the link
the_connection.wait_heartbeat()
print("Heartbeat from system (system %u component %u)" % (the_connection.target_system, the_connection.target_component))
# Once connected, use 'the_connection' to get and send messages
the_connection.mav.command_long_send(the_connection.target_system, the_connection.target_component, mavutil.mavlink.MAV_CMD_DO_AUX_FUNCTION ,0,300,2,0,0,0,0,0)
msg = the_connection.recv_match(type="COMMAND_ACK",blocking=True)
print(msg)
time.sleep(1)
the_connection.mav.command_long_send(the_connection.target_system, the_connection.target_component, mavutil.mavlink.MAV_CMD_DO_AUX_FUNCTION ,0,300,0,0,0,0,0,0)
##the_connection.mav.command_long_send(the_connection.target_system, the_connection.target_component, mavutil.mavlink.MAV_CMD_DO_SEND_SCRIPT_MESSAGE ,0,300,0,0,0,0,0,0)
msg = the_connection.recv_match(type="COMMAND_ACK",blocking=True)
print(msg)
the_connection.close()
Is there a similar command that i can use for this situation?