SoftwareSerial with A0 on Leonardo troubles


I usually work with SoftwareSerial arduino library without incidences, but now I need use A0 like RX pin on a Leonardo.
If I use digital pins (like Rx) all works fine, but I change to SoftwareSerial(A0,....) doesn't work

I have readed that Leonardo could use A0,A1 and A2 like Rx,

What must I doing bad?

Check the datasheets. I don't think it says you can use any analogue pin -just any digital pin.

What is attached to the normally free hardware serial port of your Leonardo?

A Leonardo has a spare HardwareSerial port - why would you use SoftwareSerial?


Apart from the legitimate questions above (hardware serial), the reason for your problem is that the analog inputs of the Leonardo (ATmega32U4) don't support pin change interrupts as the corresponding pins on the UNO (ATmega328p) do. So if you insist in using that lousy piece of software called SoftwareSerial you have to take care that the RX pin supports a pin change interrupt.