Arduino Mega with yun shield

Hello guys,

I have a genuine arduino MEGA 2560 with a iduino yun shield, but i cannot upload the code, see below:

Sketch uses 5,838 bytes (20%) of program storage space. Maximum is 28,672 bytes.
Global variables use 245 bytes (9%) of dynamic memory, leaving 2,315 bytes for local variables. Maximum is 2,560 bytes.

avrdude: AVR device initialized and ready to accept instructions
avrdude: Device signature = 0x1e9801
avrdude: Expected signature for ATmega32U4 is 1E 95 87
Double check chip, or use -F to override this check.

avrdude done. Thank you.

Who can i upload the sketch with the yun shield?

Thanlks in advance

Luis_Filipe:
avrdude: Expected signature for ATmega32U4 is 1E 95 87

You have apparently selected an Arduino Yun as the board type. The official Arduino Yun has a '32U4 processor that runs the sketch.

But you are using a Yun compatible shield, which has no processor that runs a sketch. Instead, you are using a MEGA 2560 to run the sketch, and that board does not have a '32U4. The error message you are getting is trying to tell you that you have built the sketch to run on a '32U4, but when it's trying to load the code it is finding a different processor, and the code won't run on that processor.

In the IDE, select the board type that matches your Arduino processor board - in this case, the fact that you're using a Yun Shield is immaterial, don't be confused by that. (It's jst a shield, just like you don't change the board type if you're using an Ethernet Shield, relay shield, or whatever.)