I have a problem with Motor Shield, I've created a sketch to control de stepper motor from Arduino with Wii Nunchuck and this sketch run grateful in Arduino UNO but this not run in Arduino YUN, and i need help to understand this issue.
You should check out the differences between a uno and a leonardo (the yun shares the same microcontroller and pins). Morever, remember that the yun uses pins rx/tx (hardware serial) to communicate with the linux side. If you shield/tft screen requires a serial, you need to hook it up other pins and use SoftwareSerial
Thank you very much Federico!!
But now I don't have a idea how to make this, I'd be very grateful if you could guide me a little with this, I see the SoftwareSerial Library but I don't know what have to do exactly.
Federico've been reading about the library and I can not understand SoftwareSerial, I have not seen any example of how it works with Yun Arduino or Arduino Leonardo and any shield, I also looked at the mapping of both ATMEGA32U4 and 328, and have seen the differences , but I can not relate that to the library SoftwareSerial, please would greatly appreciate any example or explanation of how you have to use SoftwareSerial for Arduino Motor Shield.
Yes, thanks Erni, but I don't understand how to apply this example to Arduino Motor Shield, understand that SoftwareSerial allows using certain pins as tx and rx, but still applying the example can not get it to work the Motor Shield, sorry for my inexperience I am a beginner in Arduino.
SoftwareSerial mySerial(10, 4); //set rx and tx
// motor control pins names
const int pwmA = 21;
const int pwmB = 31;
const int brakeA = 17;
const int brakeB = 15;
const int dirA = 27;
const int dirB = 1;
I used the corresponding pins of atmega328 in ATMEGA32U4, in this case the tx corresponds to 3 in UNO and 21 in YUN, and so successively, I also used SotwareSerial for use as rx and tx pins 10 and 4. And still does not work.. I hope can help me, thanks!