Skip to content

Instantly share code, notes, and snippets.

@elbruno
Last active February 14, 2020 17:07
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save elbruno/306ccd92a0f5244b265e058260961263 to your computer and use it in GitHub Desktop.
Save elbruno/306ccd92a0f5244b265e058260961263 to your computer and use it in GitHub Desktop.
DjiTelloCameraStreamOnAndOff.py
# previous code
# ...
# ...
# connect to drone
response = sendControlCommand("command")
print(f'command response: {response}')
response = sendControlCommand("streamon")
print(f'streamon response: {response}')
# drone information
battery = 0
# open drone connection for at least 25 seconds
for i in range(0, 90):
sendReadCommand('battery?')
print(f'battery: {battery} % - i: {i}')
time.sleep(1)
response = sendControlCommand("streamoff")
print(f'streamon response: {response}')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment