How to debug the openrov-software-arduino-30.0.3 command format?


I have read the code about the command class,but now i want to debug the command only use the Arduion Borad Mega2560,i just want to input some command via my Serial Port.can anybody make a example for me ?can i just input the command via SerialPort without CRC?Do we have any files or readme.txt about the command for freshman?
i make a example like this : holdDepth_toggle;this is my input via SerailPort.
who can make example for the command format?


The format for commands going to the firmware is: ( , , … );

The arguments are defined as integers and are optional. Here are two made up examples:

SomeOtherCommand( 100, 27, 14 );


thank you very much! I have read the openrov-software-arduino-30.0.3 code ,in the file CCommand.cpp,there is a funcion Parse().

you made a example for me ,but i think the example is what ArduionBoard SerialPort send out ,not i input .may be i did not say it clearly ,after i download the code into ArduionBoard,i want to input some Command via this ,

the input commamd format should like " ,();" in the function strtok( db2, " ,();" ) and also the CRC should be right .Did i misunderstand is?can you make a example ?


Ah yes. So send commands in you will either need to disable the CRC checks or generate CRC checks and prepend them to your command.

Here is where we prepend the CRC check in the node.js process before sending the command to the Arduino:

As you can see, simply prepend the CRC as a byte + “:” to the command.

It is easier to temporarily disable the CRC checking on the Arduino side to let you simply send the commands in the format ligt(255) for lights for example.

You can disable the CRC check by commenting out this line:


I know this post i a couple of months old, but I’ve just had to go through similar steps to be able to command the OpenROV from the beaglebone and i found making a small alteration in the CCommand.cpp enabled sending commands through the uart


I’ve bypassed the CRC check by including a simple variable, this ensures that non crc compliant commands from the beaglebone can be parsed, but the interface of NODEJS will still function properly.

Looking for the serial commands for the Arduino