From the limited documentation all I really knew was that the robot had two open ports on its IP address 192.168.1.1, 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:
Command | Byte String |
Stop | ff 00 00 00 ff |
Forward | ff 00 01 00 ff |
Backward | ff 00 02 00 ff |
Left | ff 00 03 00 ff |
Right | ff 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.
Discussions
Become a Hackaday.io Member
Create an account to leave a comment. Already have an account? Log In.