Emlid

Community Forum

I need c code


(Rasa Chalabi) #1

Hello
I bought navio 2
I need " simple code or Example code " to write the program like “Gcs” read data sensor
which information from “ArduCopter V3.6.3”
I could write “Python” as below
I want to write “C++ or C or Qt” like the following

---------------------------- my code python

from dronekit import connect , VehicleMode

connection_staring = “tcp:172.16.12.12:5678”
print (“connecting : %s” % (connection_staring,))
vehicle = connect (connection_staring ,wait_ready=True)

print " Battery : %s" % vehicle.battery
print " Mode : %s" % vehicle.mode.name
print " pitch : %s" % vehicle.attitude.pitch
print " yaw : %s" % vehicle.attitude.yaw
print " roll : %s" % vehicle.attitude.roll

while (1):
print " pitch : %s" % vehicle.attitude.pitch
print " yaw : %s" % vehicle.attitude.yaw
print " roll : %s" % vehicle.attitude.roll

vehicle.close()

print (“ok”)


i need c code


(Tatiana Andreeva) #3

Hi @rasa.chalabi,

Have you already seen C++ examples for Navio2 in our docs?


(Rasa Chalabi) #4

tanks tatiana.andreeva

but need c code

I need " simple code or Example code " to write the program like “Gcs” read data sensor
which information from “ArduCopter V3.6.3”
I could write “Python” as below
I want to write “C++ or C or Qt” like the following


(Tatiana Andreeva) #5

@rasa.chalabi,

I hardly can provide you with a ready solution.

You can examine the examples I shared above and use them to write your own C code.
I’d also recommend you to check QGroundControl source code, maybe you’ll find something useful there.


(Rasa Chalabi) #6

tanks tatiana.andreeva
QGroundControl has big source code project

i need sample small
exmaple c code


(Tatiana Andreeva) #7

@rasa.chalabi,

I’m afraid we don’t have such examples.
Maybe somebody from our users can help you with this question.


(Rasa Chalabi) #8

tanks tatiana.andreeva

“DroneKit-Python” library for communicating with Drones via MAVLink

I want to like this example c or c++
library for communicating with Drones via MAVLink