A wrapper for Tello Low-Level Protocol for Java applications.
You can access the Tello Low-Level Protocol by simple interface of Facade.
- run : Start communication with the Tello.
- entryCommand : Sends a command to Tello.
- Supported Commands:
- takeoff
- land
- stick rx ry lx ly speed
- rx: (left) -1 < 0 < 1 (right)
- ry: (backward) -1 < 0 < 1 (forward)
- lx: (down) -1 < 0 < 1 (up)
- ly: (ccw) -1 < 0 < 1 (cw)
- speed: 0 (slow) or 1 (fast)
- picture - Take a picture and save the jpeg file in the
~/Downloads
folder.
- Supported Commands:
- pickImage : Get a video frame image (960*720 RGB24) as a byte array.
- getStates : Get the Tello states as text like:
bat:%d;lit:%d;wifi:%d;yaw:%d
- setRecording : If
true
, video recording will start; iffalse
, the video will be saved in the~/Downloads
folder.
For example, the operation "take off, take a picture, and land" would be the following code:
public class Example {
@Test
public void testPicture() throws Exception {
try (SimpleMain main = new SimpleMain()) {
// start communication with Tello
main.run();
Thread.sleep(2000);
// takeoff
main.entryCommand("takeoff");
Thread.sleep(3000);
// take a picture
main.entryCommand("picture");
Thread.sleep(3000);
// land
main.entryCommand("land");
}
}
}
For more details, see: Example.java
See build.gradle for the software on which this software depends.
This software is released under the MIT License, see LICENSE.
This code is based on the achievements of the great pioneers: