Hello Tello Pilot!
Join our DJI Tello community & remove this banner.
Sign up

My Tello puts live continuous photos on my cell phone.

Austin Sauls

Member
Joined
Feb 23, 2021
Messages
6
Reaction score
1
Location
Atlanta, Georgia
This information was sent to [email protected].
This is in response to your request (3460933) which was later changed to (3462933). My last email said for me to consider the Red Hot Technology Developer Team‎ as my support.

When I use my Samsung Note 9 cell phone to use the Tello application or to use the DroneBlocks application, then these two application ask me to connect to the Tello. When I connect to the Tello, then a small picture shows up on the screen of the cell phone.

My Samsung Note 9 has a two and three quarter inch width and a six and a quarter inch height for the size of the screen. When the picture occurs, then its size is three and three quarter by three and one half inches (3 and 3 quarter inches by 3 and 1 quarter inches) on the Tello control screen. However, if I use the DroneBlocks and connect to Tello, then the picture size is one and three quarter inches by one and one quarter inches (1 and 3 quarter inches by 1 and 1 quarter inches). Please notice the smaller size of the picture on DroneBlocks, if you divided the height by width then you get a value of '1.4'. My computer program reduces the size of the picture to 240 pixels by 360 pixels so the height by width is '1.5' and this makes me wonder if the picture was generated by my computer program.

When I move the Tello around, then it displayes the images as they change. If I am in DroneBlocks and make the Tello fly in the air, then the picture continues to change as the Tello moves.

Here is an example of my Python program that uses OpenCV. Please note that I have inserted print number statements in the code so that you can see what is happening. The program runs and then it takes a picture and writes the picture to the files. The picture is shown to me for 5 seconds, if I press the Escape key or the q key, then it will stop running.
If I do not press a key, then the program will takeoff and land.

This is the program:
----------------
# Program "Take a picture" written by Austin Sauls
# Using Python 3.7, Pycharm, Opencv, and djitellopy.

import cv2
from djitellopy import Tello
from time import sleep
import sys

key = 0 # Test the key for escape key
picture = "picture.png" # sample selection for picture

print(10)
cv2.destroyAllWindows()
print(11)
tello = Tello()
print(12)
tello.connect()
print(13)
print(tello.get_battery())
print(14)
tello.streamon()
print(15)
# Tello drome can take picture and
# put picture image into img.
img = tello.get_frame_read().frame
print(16)
# img need to be reduced to bytes
img = cv2.resize(img, (360, 240))
#
print(17)
# writes picture in OpencvPython file
# and gives it a name of picture.png
cv2.imwrite(picture, img)
# rests so that write has time to work
print(18)
# shows the picture on screen
cv2.imshow(picture, img)
print(19)
# pause so imshow has time to work
# pauses for 5 seconds and wait for key press
key = cv2.waitKey(5000) #wait for 5 seconds
print(20)
# test the key for ESC or q to destroy pictures
if key == 27 or key == 113:
# if key is ESC or q, destroy window and exit
print(21)
cv2.destroyAllWindows()
tello.end()
print(22)
if key == 27:
sys.exit("The escape key was pressed.")
print(23)
if key == 113:
sys.exit("The q key was pressed.")
print(24)
elif key != 27 or key != 113:
print(25)
cv2.destroyAllWindows()
print(26)
tello.takeoff()
print(27)
tello.land()
print(28)
tello.end()
print(29)
sys.exit("The drone toke off and landed.")
print(30)

-----------

When the program is run and no key is pressed, then the console states this:

C:\Users\dasau\PycharmProjects\pythonProject1\OpencvPython\venv\Scripts\python.exe "C:/Users/dasau/PycharmProjects/pythonProject1/OpencvPython/Take a Picture.py"
10
11
12
Send command: command
Response: b'ok'
13
Send command: battery?
Response: b'37\r\n'
37

14
Send command: streamon
Response: b'ok'
15
16
17
18
19
20
25
26
Send command: takeoff
Timeout exceed on command takeoff
Command takeoff was unsuccessful. Message: False
27
Send command: land
Timeout exceed on command land
Command land was unsuccessful. Message: False
28
Send command: streamoff
Response: b'ok'
29
The drone toke off and landed.

Process finished with exit code -1073741819 (0xC0000005)

-----------------
When I press the Escape key while I am looking at the picture and before the 5 seconds runs out, then I get this:

C:\Users\dasau\PycharmProjects\pythonProject1\OpencvPython\venv\Scripts\python.exe "C:/Users/dasau/PycharmProjects/pythonProject1/OpencvPython/Take a Picture.py"
10
11
12
Send command: command
Response: b'ok'
13
Send command: battery?
Response: b'56\r\n'
56

14
Send command: streamon
Response: b'ok'
15
16
17
18
19
20
21
Send command: streamoff
Response: b'ok'
22
The escape key was pressed.

Process finished with exit code -1073741819 (0xC0000005)
-----------------
When I press the q key while I am looking at the picture and before the 5 seconds runs out, then I get this:

"C:/Users/dasau/PycharmProjects/pythonProject1/OpencvPython/Take a Picture.py"
10
11
12
Send command: command
Response: b'ok'
13
Send command: battery?
Response: b'54\r\n'
54

14
Send command: streamon
Response: b'ok'
15
16
17
18
19
20
21
Send command: streamoff
Response: b'ok'
22
The q key was pressed.

Process finished with exit code -1073741819 (0xC0000005)
 
  • Like
Reactions: akward59

New Threads

Members online

Forum statistics

Threads
5,008
Messages
36,263
Members
13,359
Latest member
G_Rizzle