I am trying to send some data over to my PC from the Arduipilot, I used a Normal USB connection to send over a recurring string like this:-
const AP_HAL::HAL& hal = AP_HAL_BOARD_DRIVER;
void setup()
{
hal.uartA->begin(38400);
}
void loop()
{
hal.scheduler->delay(20);
hal.console->println("Recd_String");
}
AP_HAL_MAIN();
I receive the string just fine when I open a serial monitor with baud of 38400 bits/sec. But, when I remove the USB port and plug in the 3DR radio module to the ardupilot and the PC, it gives me garbage. I know that the 3DR radios use MAVLink communication protocol, but I was wondering if it's possible to change this protocol and use a normal SPI so that I receive the data in the same format I receive when connected via USB.
If this is not possible, is there a way to convert this garbled data from the radio module to a useful string. It would be greatly appreciated if someone can help me with this.