Motor Shield on the Arduino MEGA 2560

Post here about your Arduino projects, get help - for Adafruit customers!

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
User avatar
adafruit_support_bill
 
Posts: 88088
Joined: Sat Feb 07, 2009 10:11 am

Re: Motor Shield on the Arduino MEGA 2560

Post by adafruit_support_bill »

I tested this on a Mega and it does work using the PWM frequencies for motors 3 & 4. You must use the "MOTOR34_xxKHz" constants for motors 3 & 4, not the "MOTOR12_xxKHZ" constants.

Code: Select all

    #define MOTOR34_64KHZ _BV(CS00) // no prescale
    #define MOTOR34_8KHZ _BV(CS01) // divide by 8
    #define MOTOR34_1KHZ _BV(CS01) | _BV(CS00) // divide by 64

Locked
Please be positive and constructive with your questions and comments.

Return to “Arduino”