Last active
February 14, 2020 17:07
-
-
Save elbruno/306ccd92a0f5244b265e058260961263 to your computer and use it in GitHub Desktop.
DjiTelloCameraStreamOnAndOff.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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