Dronekit on windows - can not find files

from dronekit import connect.txt (143 Bytes)

Here is a copy of the script

That script is correct, but there’s no commands to print the vehicle data to the console.

Try this (you’ll need to change the COM port and baud rate to suit your setup):

from dronekit import connect

# Connect to the Vehicle.
print("Connecting to vehicle")
vehicle = connect("COM14", wait_ready=True, baud=115200)
print("Connected")

# Get some vehicle attributes (state)
print("Get some vehicle attribute values:")
print(" GPS: %s" % vehicle.gps_0)
print(" Battery: %s" % vehicle.battery)
print(" Last Heartbeat: %s" % vehicle.last_heartbeat)
print(" Is Armable?: %s" % vehicle.is_armable)
print(" System status: %s" % vehicle.system_status.state)
print(" Mode: %s" % vehicle.mode.name)    # settable

# Close vehicle object before exiting script
vehicle.close()
print("Completed")

Hey Stephen, thanks again for all your help, I thought I replied to your last message but I just noticed I didn’t.

I have another question so , I created another file and added to that previous folder "python code " but when I go to the cmd prompt and do the “dir” cmd . the file wont show up in there , even though I know its in there.
I was thinking it there a way to update the cmd prompt or is it possible something is not saving fully correctly ?

Most likely the file didn’t save correctly. The cmd prompt will update automatically.

Hey Stephen, I want to run a mission using the dronekit , I have some files/mission that I created using mission planner . is there a way or code I can use to do that task ?

I was trying to download the examples folder on the dronekit website but it would not work for me . so i was hoping you may know of a solution .

I seen a source code from github, but that seems to like I would have to put in all the information i want so I didn’t know if that was the most simplest of solutions .

Thanks for your help!