Using an Adafruit Motor Shield with a MEGA

Hey. The UNO communicates with the motor shield (version 2) via I2C on A4 & A5. The MEGA communicates with the motor shield via I2c on D20 & D21 (duplicate pins up near the crystal). First question: Is this correct? Second: Should you do something with pins A4 & A5 with the MEGA so they don't interfere with the motor shield's I2c bus?

Google for the pin outs of both boards , or ic2 on the mega . I can’t recall off the top of my head , but that’s how I’d find out .

I have a TOF10120 laser distance sensor and an Adafruit motor shield V2 ; both running on the I2C bus from a MEGA. The MEGA puts its I2C bus out on pins D20 (SDA) & D21 (SCL. But you can also access it via A4 & A5 and also the SDA & SCL pins up near the servo pins. The laser works fine in all 3 locations. Who knew? BUT ... I expect, therefore, that you better NOT use any of those pins for anything else (if you have a motor shield). Always learning.

This topic was automatically closed 120 days after the last reply. New replies are no longer allowed.