ArduinoMavlinkDrone icon indicating copy to clipboard operation
ArduinoMavlinkDrone copied to clipboard

Data transfer

Open SoorajR-ai opened this issue 2 years ago • 2 comments

I want to make a flight controller with arduino. I'm using arduino mega. I use this library to connect to Qgroundcontrol via usb serial and i can see heart beat and gps position.

But if i want to send more datas like AHRS datas, how do i do it?

SoorajR-ai avatar Dec 26 '23 07:12 SoorajR-ai

It's a long time since I wrote this, but you should also be receiving values for throttle, pitch, yaw and roll!

Did you do the steps described in "Setting up QGroundControl" ?

pschatzmann avatar Dec 26 '23 07:12 pschatzmann

Thank you for your response! Yes, I have followed the steps described in 'Setting up QGroundControl.' I can successfully receive heartbeat and GPS position data. However, my goal is to send additional data such as AHRS datas and more. In addition to sending data from Arduino to QGroundControl, I'm interested in receiving data back from QGroundControl to Arduino. Could you please provide more guidance on how to achieve this or point me to relevant documentation? I appreciate your assistance

image

#include "SimpleMavlinkDrone.h"

SimpleMavlinkDrone drone(&Serial);

void setup() {
  Serial.begin(115200);

  drone.setValue(VOLTAGE_BATTERY, 5.0);
  drone.setValue(GPS_LATITUDE, 46.2227);
  drone.setValue(GPS_LONGITUDE, 7.3379);
  drone.setValue(GPS_ALTITUDE, 482.0);
}

void loop() {
  drone.loop();  
}

SoorajR-ai avatar Dec 26 '23 09:12 SoorajR-ai