I’ve now loaded the firmware onto the ESP32 and can connect it to the FC via a wired connection. However, the Mission Planner isn’t detecting data from the GPU and IMU—it’s only detecting the heartbeat. If anyone knows the cause, please let me know. The pins I’ve connected on the ESP32 are as shown in the image. I’m using serial port 1.
You need to either request the data from the flight controller with this
void request_datastream() {
//Request Data
uint8_t _system_id = 255; // id of computer which is sending the command (ground control software has id of 255)
uint8_t _component_id = 2; // seems like it can be any # except the number of what Pixhawk sys_id is
uint8_t _target_system = 1; // Id # of Pixhawk (should be 1)
uint8_t _target_component = 0; // Target component, 0 = all (seems to work with 0 or 1
uint8_t _req_stream_id = MAV_DATA_STREAM_ALL;
uint16_t _req_message_rate = 0x08; //number of times per second to request the data in hex
uint8_t _start_stop = 1; //1 = start, 0 = stop
// Initialize the required buffers
mavlink_message_t msg;
uint8_t buf[MAVLINK_MAX_PACKET_LEN];
// Pack the message
mavlink_msg_request_data_stream_pack(_system_id, _component_id, &msg, _target_system, _target_component, _req_stream_id, _req_message_rate, _start_stop);
uint16_t len = mavlink_msg_to_send_buffer(buf, &msg); // Send the message (.write sends as bytes)
Serial.write(buf, len); //Write data to serial port
}
or set the SRx parameters on the flight controller manually.