Pololu Robotics & Electronics
Menu
My account Comments or questions? About Pololu Contact Ordering information Distributors

How to remapping : Dual G2 High-Power Motor Driver 18v18 Shield for Arduino


#1

Hello, my motor is linked to the motor2, and its worked great, but…since I have added a captor wich use a SPI, i’ve got some problems… I understand that I need to remapp the shield to works with others pin (the 3 instead of the 10 for exemple).
Do I change this value on the “DualG2HighPowerMotorShield.cpp” and “DualG2HighPowerMotorShield.h” files?

I hope you’ll understand my question, I know my english is poor (sorry).
Thanks a lot


#2

Hello.

You can specify the new pin mapping using the constructor that takes pin number arguments in DualG2HighPowerMotorShield.h. For example, if you need to change M2PWM from pin 10 to 3, the constructor would look something like the following:

DualG2HighPowerMotorShield18v18 md(2,7,9,6,A0,4,8,3,12,A1);

- Amanda


#3

Thanks a lot