Code for Ladyada Mshield

I just bought and soldered the Ladyada MShield, but the code that's available on their website does not seem to even compile. There seems to be a problem with the library that they have provided. Does anyone have any solution/advise on this? I am planning to use the MShield to power DC Motors. thanks :slight_smile:

Are you compiling it with Arduino 11 or 12? There were some changes that needed to be made with some libraries to compile under 12.

What are the specific compile errors you were getting?

I'm using Arduino 012
Here is the specific error that I am getting:

AFMotor.cpp: In constructor 'AF_DCMotor::AF_DCMotor(uint8_t, uint8_t)':
AFMotor.cpp:61: error: 'TCCR2A' was not declared in this scope
AFMotor.cpp:61: error: 'COM2A1' was not declared in this scope
AFMotor.cpp:62: error: 'TCCR2B' was not declared in this scope
AFMotor.cpp:63: error: 'OCR2A' was not declared in this scope
AFMotor.cpp:71: error: 'COM2B1' was not declared in this scope
AFMotor.cpp:81: error: 'TCCR0A' was not declared in this scope
AFMotor.cpp:81: error: 'COM0B1' was not declared in this scope
AFMotor.cpp:81: error: 'WGM00' was not declared in this scope
AFMotor.cpp:81: error: 'WGM01' was not declared in this scope
AFMotor.cpp:82: error: 'TCCR0B' was not declared in this scope
AFMotor.cpp:83: error: 'OCR0B' was not declared in this scope
AFMotor.cpp:91: error: 'COM0A1' was not declared in this scope
AFMotor.cpp:93: error: 'OCR0A' was not declared in this scope
AFMotor.cpp: In member function 'void AF_DCMotor::setSpeed(uint8_t)':
AFMotor.cpp:136: error: 'OCR2A' was not declared in this scope
AFMotor.cpp:138: error: 'OCR2B' was not declared in this scope
AFMotor.cpp:140: error: 'OCR0B' was not declared in this scope
AFMotor.cpp:142: error: 'OCR0A' was not declared in this scope
AFMotor.cpp: In constructor 'AF_Stepper::AF_Stepper(uint16_t, uint8_t)':
AFMotor.cpp:162: error: 'TCCR2B' was not declared in this scope
AFMotor.cpp:163: error: 'OCR2A' was not declared in this scope
AFMotor.cpp:176: error: 'TCCR0B' was not declared in this scope
AFMotor.cpp:177: error: 'OCR0A' was not declared in this scope
o: In function __static_initialization_and_destruction_0': undefined reference to AF_DCMotor::AF_DCMotor(unsigned char, unsigned char)'o: In function loop': o: In function setup':

This happens when I try to compile it. Otherwise when I open up Arduino it says it cannot build the AFMotor Library.

tech support for adafruit products should be posted to forums.ladyada.net

Ok just did that, thanks.