Looking for the serial commands for the Arduino



Hello OpenROV forum.

We’re a group of students who have currently just finished building the OpenROV 2.8 and are ready to implement our control solution for it. The plan is to create our own heading and depth control using Modern control theory, more specifically a State-Space controller using an estimator.

The current idea is that we want to write our own code on the beaglebone to incooperate our own system. We plan on re-using the code on the Arduino and are therefore currently looking for the commands which the nodejs server sends to the Arduino over serial. For the sake of simplicity and lack of time, we would prefer to implement said control system directly in cpp.

We have figured out that the files such CThrusters_2X1.cpp checks whether the given command is equal to a string followed by some values (Over serial). And that there are several files managing the incoming commands, but no documentation regarding the available commands.

Question is: Is there a compiled list somewhere of commands and their associated value ranges?


We have not built up documentation on the serial commands yet. You can search the project openrov-cockpit project for mcu.SendCommand and you will find most of the commands that are sent.

The only catch to this, is that we currently CRC the command that is sent:

Commands are all in the format “[CRC]Command(parameters);”

Most commands are sending floats between -1 to 1 or 0 to 1. Given the limitation around sending floats through the current serial protocol, we have ben multiplying the floats by a large value to turn them in to a int and then reversing it back on the Arduino.



Thank you very much for your reply! We appreciate it.

Today we actually managed to figure out the syntax, just not through the given code. We hooked up a logic analyser and transmitted the commands available through the cockpit. By manually adding/calculating the associated CRC values we were able to echo our commands to the beaglebone.

echo -n -e "\xA5thro(25);" > /dev/ttyO1

After viewing the different commands recorded with the logic analyser, we were able to understand the structure and format of the OpenROV software package better. May we suggest adding some documentation with the list currently available commands and their input ranges, since this could prove helpful for developers who chose not use the cockpit.

In order to ease our debugging process and development process we decided to modify the CRC code as described in the following post: