[SOLVED] AFMotor library with Arduino Yun

Hi, I'm getting trouble using the AFMotor library for the Adafruit Motor Shield with Arduino Yún.
I had succesfully controlled four DC motors with an Arduino Uno, but when I tryed to use my Yún with the same code and the same library, I got this error message:

Arduino:1.5.5-r2 (Windows 7), Scheda:"Arduino Yún"
Arduino_Testing.ino:6: error: 'CS20' was not declared in this scope

How can I solve this error and use the Motor Shield with my Yún?

The Arduino Yun is based on the ATmega32u4, just like the Arduino Leonardo.
Those libraries are not compatible with the ATmega32u4:

So there's no way to patch the library? :frowning:
I already tryed to copy the new line of code that you posted but the CS20 is still not decleared..

EDIT: I just found a patched version of AFMotor that works on Leonardo and Yun :smiley:
Here it is: examples / Make an ArduinoControlled Robot · GitLab

That is very well done by Michael Margolis.
This is the Adafruit forum, where it it mentioned: