Coder Social home page Coder Social logo

houdinisparks / scratch_programming_tello Goto Github PK

View Code? Open in Web Editor NEW
0.0 2.0 1.0 643 KB

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.

Python 85.58% JavaScript 11.40% Batchfile 3.02%
scratch scratch-extension python tello drone socket-programming flask

scratch_programming_tello's Introduction

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

scratch_programming_tello's People

Watchers

 avatar  avatar

Forkers

naohiro2g

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.