M5 Uiflow Dji Tello Drone Control 2.0
2021-12-08 | By M5Stack
License: General Public License Arduino
* Thanks for the source code and project information provided by @gperrella
Software apps and online services
Some Specs
Weight: 80 grams (battery included)
Flight time: about 13 minutes
Let me only say that the concept starts from reading the SDK, the Tello acts as Soft AP WI-FI, with the IP address of 192.168.10.1. The M5 Core will act as a base station and take the IP 192.168.10.2, on port 8889. All the commands must be sent in UDP format.
Now this is a very simple to create flight missions for STEM projects thanks third party blocks embedded in the M5Stack UIFlow programming environment.
(Thanks to M5Stack teams to embed my custom blocks into "Tello" third part section!)
You just need to initialize the WIFI connection with the SSID of the Tello, and combine any flight commands (remember to respect sequence Takeoff before! :-) )
But I have a little Christmas gift for you, I added a basic telemetry, very useful to monitor battery status, altitude, yaw, time of flight, drone temperature and so on.
In this brief project I'll show you how to use the M5Stack UIFlow programming environment in order to take your first flight with Tello Drone!
There is the Panic button also, press A button and the drone immediately aborts the mission gently landing!
Now with just your creativity, it will be very easy to create missions for STEM projects in classrooms or simply have fun.
The code
Briefly, the code starts with an initialization section to connect the Tello Drone, and prepare UDP server on port 8890 to retrieve continuous telemetry data provided by the drone.
After TakeOff command, (wait one or two second between commands) we could use whatever sequence to move forward, backward, up, down, flip etc.
Remember to close mission with LAND command!!!!
Pay attention to the few lines of micropython code embedded to retrieve bulk telemetry data and format them into representing labels (Battery, Altitude etc.)
Field starts from #0 (pitch) and battery status is on position #10
Panic Button
Every mission is important Tello DJI is very light (80gr) but is still a drone, and may be dangerous, so pay attention to safety.
Please Keep away children and animals!
Just in case you decide to abort the mission, press A Button (the first on left) and your drone gently lands.
Conclusion
That's all folks, hope you'll find this project useful for fun with your children or spread coding for drone control with M5Stack.
For further details I suggest to read my previous projects and to read this tutorial masterfully translated by JB2K3