Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
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