I would like to adopt this library on an Arduino Mega2560:
However, the macro
DSHOT_PORT needs defined for the Mega2560 here:
So I need to add a
#if defined(__AVR_ATmega2560__) macro to that
DShot.h header, however, it is not clear to me where to lookup the port mapping on a 2560 mega. I'm looking directly at the schematic itself here:
And understand that the 'ports' are groupings of IO where the pins are described as
P?#, ? being the port letter and # being 0-7.
So what are my valid options? It appears that some ports (A,C,L) aren't pinned at all, some (D,J) only a few pins, and just about none of them (except K/F) have all port pins utilized. Also, I can see most of these pins are reserved for some type of functionality (analog, SPI, etc). I'm assuming I'm looking for a port with available pins reserved for PWM, such as Port B (pins 10-13 are PWM). Would this be correct?