I have a drone connected via UART to an ESP32 Controller I have connected to the Arduino IDE. I want to ensure that I have successfully established communication with the drone (currently running Betaflight firmware) and would like to send it msp commands to ensure that it is connected properly. How can I go about this?
I tried this sample code:
#include <MSP.h>
MSP msp;
void setup()
{
Serial.begin(115200);
msp.begin(Serial);
}
void loop()
{
msp_rc_t rc;
if (msp.request(MSP_RC, &rc, sizeof(rc))) {
uint16_t roll = rc.channelValue[0];
uint16_t pitch = rc.channelValue[1];
uint16_t yaw = rc.channelValue[2];
uint16_t throttle = rc.channelValue[3];
}
}
And got this output:
rst:0x3 (SW_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT)
configsip: 0, SPIWP:0xee
clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
mode:DIO, clock div:1
load:0x3fff0030,len:1344
load:0x40078000,len:13964
load:0x40080400,len:3600
entry 0x400805f0
ets Jul 29 2019 12:21:46
Not sure how to interpret this.
Nick Galis is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.