Skip to content

Using scratch 2.0 offline editor to program the drone. Includes convenience keys 'c' to connect the drone, and auto status updates to check if drone is connect or not.

Notifications You must be signed in to change notification settings

houdinisparks/scratch_programming_tello

Repository files navigation

Controlling DJI Tello Drone using Scratch

A makerfaire 2018 project

Overview

Basic Architecture
Architecture

Prerequisitess

  • Scratch 2.0 Offline Editor download link
  • DJI Tello (i bought mine for around SGD 135)
  • Python 3.6

1) Open Scratch 2.0 and import the project

  1. Open Scratch 2.0 Program
  2. Go to File -> Open
  3. Go to the /projects folder in the project root folder
  4. Select all_projects.sb2 to see preprogrammed templates.

Scratch Window
Scratch Window

You basically drag and drop block commands from the command palette to the execution panel to program the drone.

Drone Blocks reside in More Blocks section in command palette.

2) Start the python backsend server

Go to project folder and double click on the start.bat script. It will first install your virtual environment if you dont have one, and then start the server. Start bat file output

To check that the scratch program is detecting the backend server, ensure that there is a green circle status output at the More Blocks command palette

To start the backsend server programitically (without the .bat script)
Open your command prompt

cd <project-dir>
python -m venv venv

# activates the virtual environment
call venv/Scripts/activate.bat
pip install -r requirements.txt

# runs the server
python run.py

3) To connect the drone to the wifi network

Wifi network

  1. Open your wifi panel and connet to the drone's Wifi SSID
  2. Go back to the Scratch program and press ‘c’ on the keyboard to connect the drone
  3. Ensure the tello state is connected and properties are populated at the tello status section Tello status

You are ready!! :D

References

About

Using scratch 2.0 offline editor to program the drone. Includes convenience keys 'c' to connect the drone, and auto status updates to check if drone is connect or not.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published