Where in the code is the control of the 6x servo / ESC?


#1

I’m searching through the OpenROV source code to find where the control for the 6 servo / ESC ports are. I’m just getting started but my goal is to modify the code for a 6 thruster design. Or would I be able to simply do this with a plugin?


#2

The idea is that you will be totally able to do this through plugins. The challenge being that we don’t have other control system plugins available to model your own after yet. They are coming! We have a RC Truck conversion that I’ll probably add next.

Take a look at:

Inside they designate which servo ports they want loaded in to motors:

https://github.com/OpenROV/openrov-software-arduino/blob/master/OpenROV/Thrusters2X1.cpp#L10-L14

The actual defined values are currently in the controlboard.cpp file:

https://github.com/OpenROV/openrov-software-arduino/blob/master/OpenROV/controllerboard25.h#L7-L13


#3

Awesome. I’m looking forward to your updates / examples. One other question, if I may, is there somewhere that identifies the pin numbers? Looking at the control board schematic I see jumpers “J20” and “J21” and rows “D6” through “D11”. Are pins 6, 7, and 8 in the code the same as pins D6, D7, and D8 on the controlboard?


#4

J20 and J21 are the physical connectors that are stuffed into the circuit board. D6, D7, and D8 refer to the Arduino definitions of digital I/O pins, and yes, are the same as pins 6,7, and 8 in the Arduino (Controller Board) code.


#5

Thanks Walt. That clears that up. :slight_smile: