Scratch3 0tello-EN
Scratch3 0tello-EN
0 Tello
Extension
v1.1 20211013
Overview
Tello Extension allows users to use Scratch 3.0 to control Tello with visual programming.
Safety Features
After Tello executes the current command, if there is no additional command input after 15
seconds, the drone will automatically land.
The extension only supports Direct Wi-Fi (AP mode). If Tello enters STA mode, you can press and
hold the power button for 5s when the drone is on. The status indicator will turn off and the
drone will restart. When the status indicator blinks yellow, the Wi-Fi SSID will restore to factory
settings, with no set password by default.
Architecture
The extension will automatically create two UDP clients that bind to ‘0.0.0.0:45689’ and
‘0.0.0.0:8890’ respectively. Port ‘45678’ is responsible for sending and receiving commands to
Tello. Port ‘8890’ is responsible for receiving Tello status information. Before using the extension,
make sure both ports are available.
Quick Start
1. Power on Tello, connect computer to Tello’s Wi-Fi, and launch Scratch 3.0 for Tello
Extension;
2. Click the Add Extension button on the bottom left corner to open the extension selection
interface;
4. Read the command block instructions, and drag the blocks to use them. You can see one
example bellow. A connect block is always required at the beginning of the program. A wait
execute all cmds block is required at the end of any non-blocking command (blocking and
non-blocking commands will be explained later);
5. Click the code block to initiate the program. A Connecting window will pop up to connect with
Tello. Once the drone is connected, the Connecting window will close automatically and the
programs will run successively. The connect block will execute the connection command
before running every code to make sure Tello is stably connected to the computer;
6. As a state display block is used, the Tello status window will appear and can be closed at any
time;
7. While a program is running, the entire code module will be highlighted in yellow. You can
stop the program mid-execution by clicking the Stop button.
Blocking and Non-blocking
Non-blocking Blocks
When using non-blocking blocks, all command blocks will automatically be set to completed and
then send a land command to end the program. After that, the entire code module will no longer
be highlighted in yellow and the Stop button will not be functional.
As shown in the illustration, the program will directly complete and exit.
To turn an unblocking block into a blocking state, put wait execute all cmds
successively, which means a command will only execute when the previous one is completed.
and then be followed by blocking blocks. There are no limits for connections between blocking
blocks. A blocking block can be followed directly by a non-blocking one.
Command Blocks
: To connect with Tello, check the connection between a single block and
Note: This block must be put at the beginning of the Tello program.
Attention: This block should be used with ,that comes with scratch 3.0 and
: To set speed
: To take off
: To land
x, y and z should not be in the -20 to 20 range all at the same time.
To set the speed at (cm/s) and fly through (x1,y1,z1) in a curve to (x2,y2,z2). If the curve radius is
not in the 0.5-10 meters range, return relevant notifications;
x, y and z should not be in the -20 to 20 range all at the same time.
:
Plain-text command: To send plain-text commands in non-blocking or blocking mode.
Status Information
FAQs
2. If the following error occurs when launching Scratch, it means another software is occupying
Port 8890. To fix, close the software and restart Scratch.
Detailed steps:
(1) Press win+R to launch Command Input and enter powershell to open up the Windows
Terminal;
(2) Enter netstat -aon|findstr "8890" in the Terminal to get the program pid;
(3) Enter taskkill /T /F /PID 16908 in the Terminal (16908 is the pid value returned in the last
step), close the program and restart Scratch.