Let’s start with a project demo video post:

www.bilibili.com/video/BV1rD…

I know my friends, probably know that I am a “luck overflowing” people, often can “pick up” some fun things. Two days ago, I “picked up” a DJI RoboMaster Tello Talent TT educational UAV (hereinafter referred to as: TT UAV or TT) is a new product based on dJI Tello EDU uav upgrade, which can be programmed by third party software, so don’t come to try it!

Introduction to TT UAV

In order to program and control this TT UAV, I specially checked (copied) read (attacked) the introduction and related materials on the official website of DJI.

TT UAV is the first educational UAV of DJI embracing open source. In order to make the UAV more in line with the spirit of open source and the core of youth science and technology innovation education, and to provide teachers and students in domestic primary and secondary schools with more extreme teaching experience, DJI cooperated with DFRobot to deeply combine Mind+ graphical programming software with TT UAV. Making the TT drone even more powerful. Through extensive software and hardware expansibility, it can realize various applications such as environment perception, face recognition, automatic following, gesture recognition, palm control, multi-machine collaboration, artificial intelligence and so on.

So how does the TT drone embrace open source?

  • TT extension module based on ESP32 controller: TT UAVs add an open source controller based on DJI’s original Tello EDU UAV. It is a master control board based on ESP32 chip. Based on the powerful open source ecosystem of ESP32, TT UAV can support Arduino, microPython, graphics and other programming environments. At the same time with ESP32 powerful WiFi, Bluetooth connection functions, with strong communication capabilities.

  • Integrated with a variety of programmable sensors/modules: equipped with RGB full-color LED lights, 8×8 red/blue dual-color LED dot matrix screen, ToF infrared ranging sensor, etc., can achieve a variety of programming effects such as lighting control, pattern animation display, intelligent obstacle avoidance and so on.

  • Adapter expansion board, supporting third-party sensors: In order to enable users to connect more open source hardware and achieve richer creativity, TT UAV provides a 2×7 PIN 2.54mm spacing direct plug package interface, supporting various programming protocols I2C, SPI, UART, GPIO, and provides 5V/3.3V power interface.

  • Open RoboMaster SDK: With the new RoboMaster SDK and video streaming data, it can easily support a variety of programmable sensor interfaces, machine vision, deep learning and other cutting-edge ARTIFICIAL intelligence technology into primary and secondary school classrooms.

Programming control framework

If the TT UAV needs to be controlled, there are two ideas:

1. Direct control: TT UAV is actually similar to DJI Tello UAV. It has its own flight controller. The control commands from the mobile phone App or handle can be directly sent to the controller of THE TT UAV, and further become flight commands through the controller; Some information about the drone, such as battery power and current altitude, can also be sent directly from the controller.

2. Indirect control: Indirect control is actually achieved through the TT extension module. The TT extension module controls the UAV by sending control instructions to the controller of THE TT UAV, just like the mobile App and handle. And this specific communication process is realized by the TT UAV airborne Micro USB interface through serial communication. In this way, TT uav can be indirectly controlled by programming the TT extension module, obtaining the relevant information of third-party software or various open source hardware and sensors.

So the TT expansion is the equivalent of an external brain attached to the TT drone. It not only expands the perception ability of TT UAV itself, but also enriches the functionality of TT UAV. We can write our own program into the TT expansion module, so that the TT UAV assembly can complete complex flight tasks that are difficult to complete by TT UAV itself. At the same time, compared with manual remote control, with the help of program control, we can complete more accurate control instructions.

Test mission

With that said, let’s start programming the TT drone for a small test mission.

According to dJI, the TT drone can be remotely controlled via the Tello App and a custom Version of the GameSir Chicken Handle T1D. Since it is an educational drone embracing open source, I will certainly do whatever I want with the TT drone. Why not design a DIY version of the remote control for my phone? You can play it any way you want, for example by programming it to do more complicated stunts.

Why design your own remote control when you already have one that’s officially supported? Here’s why:

  • If you use the Tello App for remote control, you can’t use programming, let alone integrate third-party sensors, and the TT is no different from a regular Tello drone.
  • If the GameSir handle is used for remote control, programming and third-party sensors can be added, but at present, DJI only provides the Arduino code version of the programming example, and there is no graphical version of the example program, which is not suitable for most primary and secondary school students to learn.

So how would I implement a DIY remote?

  • In order to make it more convenient for everyone to get started, I will use Mind+ graphical programming environment. Through simple block dragging and dropping, rich functions can be completed.
  • During the trial play, in order to reduce the hardware cost, I will only use the mobile phone and realize the design and production of DIY remote control through Blynk Internet of Things platform. Blynk iot platform is a very simple and easy to use iot development platform, you can create a mobile App for your iot project in a few minutes.

For this project, I upgraded the previously designed Mind+ version of the Blynk user library to support TT DRONE programming. After learning the programming principle of this project, you can not only design the mobile App to control DJI UAV by yourself, but also design the hardware remote control handle of the physical version.

  • For the Mind+ tutorial, please refer to the Mind+ official tutorial due to space limitations.

  • For an introductory tutorial on Blynk, please refer to my other book, Internet of Things, So Easy! — IoT Project Practices based on the Blynk platform.

Blynk project Settings

As a DIY version of what could be the first TT drone remote control, what would I design this remote to look like? In order to facilitate the operation and unify the use experience, I design a simplified version of the control interface by referring to the appearance of Tello App.

In addition to take-off/landing functions, the most important component of the Tello App is the flight control of the UAV. It uses two joysticks to achieve various movements of the UAV, as shown in the picture below:

In addition, we can also see some status information of UAV in the status bar at the top of the App, such as electric quantity, Bluetooth, speed, altitude, etc., as shown in the picture below:

I designed a simplified version of Blynk remote controller interface according to the main interface of Tello App, as shown below:

Due to the limitation of Blynk App, automatic landscape display is not supported, so when we control landscape, the displayed text will become vertical, but this does not affect the use at all.

Mind+ Programming

After designing the interface of the remote control, we started programming. Open Mind+ software, switch to upload mode, and select RoboMaster TT(ESP32) as the main control board in the extension, as shown below:

Note that the Mind+ software version used in this project is V1.6.5RC2.0. With the software upgrade, some interfaces and functions may be modified in the future. Please adjust and modify according to the actual situation.

Then import the Blynk extension library into the user library, as shown below:

Now you can start programming. First of all, TT UAV related initial Settings and Blynk basic Settings: start UAV flight control, set Blynk to Bluetooth BLE connection mode (convenient to use in outdoor scenarios without WiFi), and name Bluetooth as RMTT (TT UAV English abbreviation). After initialization, the TT flag is displayed on the dot matrix screen, and then the Blynk-related process is run in a loop.

Then, some sensor information of TT UAV is periodically sent to Blynk App for display, mainly including electric quantity, speed, TOF ranging (front distance), height, etc.

And then flight control related procedures. The TT UAV’s underlying SDK in Mind+ provides two control modes: blocking and non-blocking. In the latest Mind+ V1.6.5RC 2.0 version used in this project, the graphical instructions invoke the blocking mode SDK. Because Blynk needs to communicate with the server “all the time,” blocking mode, when used with Blynk, causes Blynk to disconnect from the server. Therefore, in the flight control of this project, we realized the non-blocking control mode by directly sending SDK control commands. By referring to the official SDK manual of TT UAV, we can easily get the corresponding commands of different flight states, as shown in the figure below:

In addition, the communication between the TT extension module and the TT UAV main body is carried out through serial port 1, so as long as the TT extension module sends instructions to the TT UAV main body through serial port 1 during programming. For example, to takeoff the TT drone automatically, just send the [TELLO] takeoff command; To control the TT drone to fly 30 cm to the right, just send [TELLO] right 30. The corresponding graphical commands are as follows:

After understanding the sending mode of TT UAV SDK instruction, we can formally conduct flight control of TT UAV.

The first is one-button takeoff and landing. V0 button in Blynk App stands for takeoff control; V1 number button stands for landing. When taking off and landing, display the corresponding up arrow and country arrow to prompt. The procedure is shown in the figure below:

Then came the programming of the left stick. The left rocker is mainly used to control the UP (U: up), down (D: Down), clockwise rotation (large C: CCW), counterclockwise rotation (small C: CW) of TT UAV. When carrying out the corresponding flight tasks, the corresponding prompt information will be displayed on the dot matrix screen. The procedure is shown in the figure below:

The programming of the right stick is similar. The right rocker is mainly used to control the forward (F: forward), backward (B: back), left (L: left) and right (R: right) of TT UAV. Also display the corresponding prompt information on the dot matrix screen. The procedure is shown in the figure below:

Finally, we add another safety protection measure: when the TT UAV loses connection with the remote control of mobile phone (TT expansion loses connection or Blynk loses connection), it will land automatically, and the dot matrix screen displays E (Error) to remind users to ensure safety. The procedure is shown in the figure below:

The above is the complete design process of this project. Due to space limitation, only a simple program is designed. The full app is shown below, but you can also modify it to add more cool features or aerobatics.

Results demonstrate

Upload the program to the TT extension module and take it outside for a test flight. The demo video can be viewed back at the beginning of this article.

conclusion

This is the end of the test flight experience tutorial. In general, combined with DJI’s perfect flight control technology and Mind+ simple programming experience, it is very easy to use this TT UAV by simply dragging graphical commands and sending relevant flight commands to complete complex flight motion control. Of course, this article has only explored some of the very simple functions of the TT drone. Later, I will unlock more interesting ideas for the TT drone.