Coding4Fun Drone 🚁 posts
- Introduction to DJI Tello
- Analyzing Python samples code from the official SDK
- Drone Hello World ! Takeoff and land
- Tips to connect to Drone WiFi in Windows 10
- Reading data from the Drone, Get battery level
- Sample for real time data read, Get Accelerometer data
- How the drone camera video feed works, using FFMPEG to display the feed
- Open the drone camera video feed using OpenCV
- Performance and OpenCV, measuring FPS
- Detect faces using the drone camera
- Detect a banana and land!
- Flip when a face is detected!
- How to connect to Internet and to the drone at the same time
- Video with real time demo using the drone, Python and Visual Studio Code
- Using custom vision to analyze drone camera images
- Drawing frames for detected objects in real-time in the drone camera feed
- Save detected objects to local files, images and JSON results
- Save the Drone camera feed into a local video file
- Overlay images into the Drone camera feed using OpenCV
- Instance Segmentation from the Drone Camera using OpenCV, TensorFlow and PixelLib
- Create a 3×3 grid on the camera frame to detect objects and calculate positions in the grid
- Create an Azure IoT Central Device Template to work with drone information
- Create a Drone Device for Azure IoT Central
- Send drone information to Azure IoT Central
I my previous posts I shared some links about the DJI Tello drone. One of them is the SDK 220.127.116.11. In this document we can find the main commands and descriptions of the specifics commands to use to communicate with the drone.
The document also links a Python sample file with the following code:
The code is very easy to read:
- Lines 10-14. Defines the main libraries to be used. I never used sockets and threads in Python, so this is an excellent chance for me to learn about this
- Lines 16-26. Implements the basic communication via UDP described in the architecture from the SDK. Accessing the drone via IP 192.168.10.1 and port 8889, and bind to localhost with post 9000
- Lines 28-48. Function to receive data from the drone. It’s executed in an different thread, so here are my 1st multi-threading python app.
- Lines 50-74. Main App Loop, where it waits for user type command and send the command to the drone. It also checks for Python version, and close the socket before end.
An amazing way to start playing with the drone. Just 5 minutes to connect and have something up and running.
More posts in my blog ElBruno.com.