The new Raspberry Pi B Model B+ is here - Pick one up in the store and check our detailed guide!

AFMotor MultiStepper

by rshunter on Sun Feb 17, 2013 9:05 am

> When I try to verify the the code for AFMotor_MultiStepper or AFMotor_ConstantSpeed I get the > following errors.
> It is running from Sketchbook.
>
> /home/rsh/Arduino/arduino-1.0.3/libraries/AFmotor/AFMotor.cpp:136:5: error:
> #error "This chip is not supported!"
> /home/rsh/Arduino/arduino-1.0.3/libraries/AFmotor/AFMotor.cpp:173:5: error:
> #error "This chip is not supported!"
> /home/rsh/Arduino/arduino-1.0.3/libraries/AFmotor/AFMotor.cpp:205:5: error:
> #error "This chip is not supported!"
> /home/rsh/Arduino/arduino-1.0.3/libraries/AFmotor/AFMotor.cpp:226:5: error:
> #error "This chip is not supported!"
> /home/rsh/Arduino/arduino-1.0.3/libraries/AFmotor/AFMotor.cpp:259:5: error:
> #error "This chip is not supported!"
> /home/rsh/Arduino/arduino-1.0.3/libraries/AFmotor/AFMotor.cpp:279:5: error:
> #error "This chip is not supported!"
> /home/rsh/Arduino/arduino-1.0.3/libraries/AFmotor/AFMotor.cpp:314:5: error:
> #error "This chip is not supported!"
> /home/rsh/Arduino/arduino-1.0.3/libraries/AFmotor/AFMotor.cpp:334:5: error:
> #error "This chip is not supported!"
> /home/rsh/Arduino/arduino-1.0.3/libraries/AFmotor/AFMotor.cpp: In
> constructor ‘AF_Stepper::AF_Stepper(uint16_t, uint8_t)’:
> /home/rsh/Arduino/arduino-1.0.3/libraries/AFmotor/AFMotor.cpp:438: error:
> ‘CS20’ was not declared in this scope
>
> I am using a Leonardo board running on Ubuntu. The LCD with backpack runs OK
> (after some help from you).
>
> Thanks for your help.
> Ron Hunter (rshunter@sympatico.ca)
rshunter
 
Posts: 3
Joined: Wed Dec 26, 2012 4:07 pm

Re: AFMotor MultiStepper

by adafruit_support_rick on Sun Feb 17, 2013 4:36 pm

Unfortunately, it means that the Leonardo cannot be used with the AFMotor library. The Leonardo uses an ATmega32U4 chip, which has a different arrangement of timers and pins than the ATmega328 used in the UNO. The AFMotor library has not been written to work with the 32U4.
User avatar
adafruit_support_rick
 
Posts: 10753
Joined: Tue Mar 15, 2011 10:42 am
Location: Buffalo, NY

Re: AFMotor MultiStepper

by haasebert on Thu Mar 14, 2013 8:08 pm

Is anyone working on porting a library for the Leonardo?
haasebert
 
Posts: 1
Joined: Thu Mar 14, 2013 8:07 pm

Re: AFMotor MultiStepper

by adafruit_support_rick on Fri Mar 15, 2013 10:46 am

We are in the process of porting our libraries to Leonardo and Due. Offhand, I can't say whether or not the motor shield is even compatible with Leonardo, due to the different pin mappings for the timers. I'll have to investigate that.
User avatar
adafruit_support_rick
 
Posts: 10753
Joined: Tue Mar 15, 2011 10:42 am
Location: Buffalo, NY

Re: AFMotor MultiStepper

by adafruit_support_rick on Sun Mar 17, 2013 9:30 am

I just checked the timer pinouts, and it looks like it ought to be possible to port the library to Leonardo. No time frame for that, however.
User avatar
adafruit_support_rick
 
Posts: 10753
Joined: Tue Mar 15, 2011 10:42 am
Location: Buffalo, NY

Re: AFMotor MultiStepper

by displaced1980 on Fri May 10, 2013 3:20 pm

Michael Margolis has produced a version of the AFMotor library to accompany his book on using the Arduino for robotics.

The publisher of the book has made the library available as part of this download:
http://examples.oreilly.com/0636920028024/
displaced1980
 
Posts: 1
Joined: Fri May 10, 2013 3:14 pm