element14 Community
element14 Community
    Register Log In
  • Site
  • Search
  • Log In Register
  • Members
    Members
    • Benefits of Membership
    • Achievement Levels
    • Members Area
    • Personal Blogs
    • Feedback and Support
    • What's New on element14
  • Learn
    Learn
    • Learning Center
    • eBooks
    • STEM Academy
    • Webinars, Training and Events
    • More
  • Technologies
    Technologies
    • 3D Printing
    • FPGA
    • Industrial Automation
    • Internet of Things
    • Power & Energy
    • Sensors
    • More
  • Challenges & Projects
    Challenges & Projects
    • Design Challenges
    • element14 presents
    • Project14
    • Arduino Projects
    • Raspberry Pi Projects
    • More
  • Products
    Products
    • Arduino
    • Dev Tools
    • Manufacturers
    • Raspberry Pi
    • RoadTests & Reviews
    • Avnet Boards Community
    • More
  • Store
    Store
    • Visit Your Store
    • Choose Another Store
      • Europe
      •  Austria (German)
      •  Belgium (Dutch, French)
      •  Bulgaria (Bulgarian)
      •  Czech Republic (Czech)
      •  Denmark (Danish)
      •  Estonia (Estonian)
      •  Finland (Finnish)
      •  France (French)
      •  Germany (German)
      •  Hungary (Hungarian)
      •  Ireland
      •  Israel
      •  Italy (Italian)
      •  Latvia (Latvian)
      •  
      •  Lithuania (Lithuanian)
      •  Netherlands (Dutch)
      •  Norway (Norwegian)
      •  Poland (Polish)
      •  Portugal (Portuguese)
      •  Romania (Romanian)
      •  Russia (Russian)
      •  Slovakia (Slovak)
      •  Slovenia (Slovenian)
      •  Spain (Spanish)
      •  Sweden (Swedish)
      •  Switzerland(German, French)
      •  Turkey (Turkish)
      •  United Kingdom
      • Asia Pacific
      •  Australia
      •  China
      •  Hong Kong
      •  India
      •  Korea (Korean)
      •  Malaysia
      •  New Zealand
      •  Philippines
      •  Singapore
      •  Taiwan
      •  Thailand (Thai)
      • Americas
      •  Brazil (Portuguese)
      •  Canada
      •  Mexico (Spanish)
      •  United States
      Can't find the country/region you're looking for? Visit our export site or find a local distributor.
  • Translate
  • Profile
Attack of the Drones
  • Challenges & Projects
  • Project14
  • Attack of the Drones
  • More
  • Cancel
Attack of the Drones
Blog Telegram Controlled Drone #2 : Preparation - Drone and M5Stack module
  • Blog
  • Forum
  • Documents
  • Events
  • Members
  • Mentions
  • Sub-Groups
  • Tags
  • More
  • Cancel
  • New
Attack of the Drones requires membership for participation - click to join
Blog Post Actions
  • Subscribe by email
  • More
  • Cancel
  • Share
  • Subscribe by email
  • More
  • Cancel
Group Actions
  • Group RSS
  • More
  • Cancel
Engagement
Author: jissdeodates
Date Created: 25 May 2021 4:00 PM
Views: 356
Likes: 2
Comments: 0
  • m5stack
  • telegram
  • drone
  • telegram control
  • attackofdronesch
  • dji tello
  • attackofthedronesch
Related
Recommended

Telegram Controlled Drone #2 : Preparation - Drone and M5Stack module

jissdeodates
jissdeodates
25 May 2021

Preparation of DJI Tello Drone

 

 

A detailed guide on preparing the DJI Tello Drone is provided here: Gesture Controlled Drone #2 : Preperation - Drone

The Tello drone SDK provides ample information on how to program the drone to achieve the tasks via Tello commands, but are somewhat limited in the features. The Tello SDK connects to the aircraft through a Wi-Fi UDP port, allowing users to control the aircraft with text commands. We use Wi-Fi to establish a connection between the Tello and the M5Stack module. Once powered on Tello acts as Soft AP Wi-Fi (192.168.10.1) to accept commands via port 8889.

The Tello SDK includes three basic command types.

Control Commands (xxx)

Returns “ok” if the command was successful.

Returns “error” or an informational result code if the command failed.

Set Command (xxx a) to set new sub-parameter values

Returns “ok” if the command was successful.

Returns “error” or an informational result code if the command failed.

Read Commands (xxx?)

Returns the current value of the sub-parameters.

Even though Tello is pretty maneuverable, with a number of different axes on which we can control the drone, in this project, we will use the following commands.

  • takeoff : Auto takeoff.
  • land : Auto landing.
  • up x : Ascend to “x” cm.
  • down x : Descend to “x” cm.
  • left x : Fly left for “x” cm.
  • right x : Fly right for “x” cm.
  • forward x : Fly forward for “x” cm.
  • back x : Fly backward for “x” cm.

 

Please refer to the SDK for a full set of commands.

 

As a safety feature, if there is no command for 15 seconds, the Tello will land automatically.

 

Tello API

 

As we are using Arduino as the platform, we need an API that can translate our commands to UDP packets to be sent using the Arduino program.

 

TelloArduino is an Arduino library for controlling DJI Tello through ESP32 Module. This library controls the Tello by sending commands via UDP as mentioned in the SDK documentation.

 

  • To download, enter the following command in the terminal (Mac/Linux) or command prompt Windows) or click the "DOWNLOAD ZIP" button.

     $ git clone https://github.com/akshayvernekar/telloArduino.git

  • Place the "tello" folder in your Arduino sketch folder/libraries/ folder. Now Restart the IDE.
  • In your Arduino IDE, go to Sketch > Include Library > choose "tello" to include this library in your sketch.

Preparation of M5Stack module

 

 

A detailed guide on preparing the M5Stack module is provided here: Gesture Controlled Drone #3 : Preperation - M5Stack

M5Stack modules support programming in Arduino, Blockly language with UIFlow, Micropython.

 

Download Arduino IDE

  • Open up your browser, and visit Arduino's official website.
  • Download and install the version according to your operating system.

 

Install ESP32 Boards Manager

 

  • Open up the Arduino IDE, and navigate to File -> Preferences -> Settings
  • Add the following ESP32 Boards Manager URL to Additional Boards Manager: https://dl.espressif.com/dl/package_esp32_index.json
  • Hit OK
  • Navigate to Tools -> Board: -> Boards Manager
  • Search ESP32 in the Boards Manager window, and click Install

 

Install M5Stack Library

 

  • Open Arduino IDE, then Select Sketch->Include Library->Manage Libraries
  • Search M5Stack and install it

 

For Windows machines, an additional USB to serial Driver needs to be installed.

 

Arduino port Configuration

 

  • Choose the correct board, baud rate, and serial port.
  • Once set up, you can upload our code from here: https://github.com/crisdeodates/Tello_Telegram_M5Stack_control
  • Click Upload, to flash the code to the device
  • Once successfully flashed, the M5Stack module will show the corresponding output on its display as well as Arduino Serial Monitor.

 

 

References:

 

https://dl-cdn.ryzerobotics.com/downloads/Tello/Tello%20SDK%202.0%20User%20Guide.pdf

https://store.dji.com/product/tello

https://github.com/akshayvernekar/telloArduino

https://docs.m5stack.com/en/quick_start/m5core/m5stack_core_get_started_Arduino_Windows

https://www.arduino.cc/reference/en/libraries/m5stack/

https://shop.m5stack.com/products/fire-iot-development-kit?variant=16804798169178

https://docs.m5stack.com/

 

 

Blog Series:

 

Telegram Controlled Drone #1 : Introduction

Telegram Controlled Drone #2 : Preparation - Drone and M5Stack module

Telegram Controlled Drone #3 : Preparation - Telegram Bot

Telegram Controlled Drone #4 : Integration and Testing

Telegram Controlled Drone #5 : Conclusion and Future Scope

Anonymous
Element14

element14 is the first online community specifically for engineers. Connect with your peers and get expert answers to your questions.

  • Members
  • Learn
  • Technologies
  • Challenges & Projects
  • Products
  • Store
  • About Us
  • Feedback & Support
  • FAQs
  • Terms of Use
  • Privacy Policy
  • Legal and Copyright Notices
  • Sitemap
  • Cookies

An Avnet Company © 2022 Premier Farnell Limited. All Rights Reserved.

Premier Farnell Ltd, registered in England and Wales (no 00876412), registered office: Farnell House, Forge Lane, Leeds LS12 2NE.

ICP 备案号 10220084.

Follow element14

  • Facebook
  • Twitter
  • linkedin
  • YouTube