Figuring out how to control it manually

A project log for WiFi Tank Robot

Smart tank robot with facial recognition

Sinclair GurnySinclair Gurny 06/24/2019 at 03:130 Comments

From the limited documentation all I really knew was that the robot had two open ports on its IP address, port 8080 for video streaming, and port 2001 for control. I also knew vaguely that some byte string like ff000100ff sent to the control port made the robot drive forward. I started working on a simple python program that could control the robot as well as view the video stream. OpenCV was used for the video stream and the socket library was used for the control port.

The basic commands that I knew at this point:

CommandByte String
Stopff 00 00 00 ff
Forwardff 00 01 00 ff
Backwardff 00 02 00 ff
Leftff 00 03 00 ff
Rightff 00 04 00 ff

The byte string is split into 5 parts.

Head: FF

Type: 00

Command: 01

Data: 00

Tail: FF


After realizing that the forward command drives straight until told to stop, and same for the other commands. I changed my program to take commands like: f 1.5 to drive forward for 1.5 seconds.